Resolves the scope key based on tracking scope and invocation ID.
The tracking scope (INVOCATION or GLOBAL).
Optional
The invocation ID (required for INVOCATION scope).
The resolved scope key string.
Resolves the scope key based on tracking scope and invocation ID.