Skip to content

Conversation

@jpnurmi
Copy link
Collaborator

@jpnurmi jpnurmi commented May 22, 2025

This PR fixes the issue that when scope data is merged into events, the scope data currently takes precedence for tags, contexts, and extra data.

For example, if a scope has the following tags/contexts/extra:

{ "both": "scope", "scope-only": "scope" }

And an event has the following data in the respective field:

{ "both": "event", "event-only": "event" }

Expected result (event data takes precedence):

{ "both": "event", "event-only": "event", "scope-only": "scope" }

Actual result (scope data takes precedence):

{ "both": "scope", "event-only": "event", "scope-only": "scope" }

Copy link
Collaborator

@supervacuus supervacuus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, @jpnurmi. Since this is a breaking change (even if it fixes towards expected behavior), can you please:

  • provide a changelog section that mentions this as a breaking change (in addition to the fix, but referencing the same PR)
  • link that "breaking" to the docs that support this as the expected outcome

@jpnurmi
Copy link
Collaborator Author

jpnurmi commented May 23, 2025

I wanted to offload this from the local scope PR, but it's ok to hold this off until local scopes are ready. Even if it's the correct behavior, as far as I know, nobody has asked for this, and there's always a risk someone somewhere is relying on the wrong behavior. The breaking change will be easier to sell together with local scopes that justify the behavior change. :)

@jpnurmi jpnurmi merged commit fc6a314 into master Jun 4, 2025
35 checks passed
@jpnurmi jpnurmi deleted the fix/scope-merge branch June 4, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants