We have multiple places in which we need to combine the ScopeData of global, isolation and current scopes, to apply this data to telemetry items (events, logs, metrics, soon also spansV2). Previously, we did this in-place or with helpers that were not re-used. This PR now unifies the various locations to one helper from core which can be reused everywhere.
Note
The pull request "ref(core): Extract and reuse
getFinalScopeDatahelper" was created by @Lms24 but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.We have multiple places in which we need to combine the
ScopeDataof global, isolation and current scopes, to apply this data to telemetry items (events, logs, metrics, soon also spansV2). Previously, we did this in-place or with helpers that were not re-used. This PR now unifies the various locations to one helper from core which can be reused everywhere.