Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Tags when sending event #535

Closed
2 tasks
xamix opened this issue May 11, 2021 · 3 comments
Closed
2 tasks

Merge Tags when sending event #535

xamix opened this issue May 11, 2021 · 3 comments
Labels
area: api area: core enhancement New feature or request SDK parity Behavior that other SDKs provide and we are missing or implement differently

Comments

@xamix
Copy link

xamix commented May 11, 2021

Description

When I capture an event, I add some specific tags in the event.
But when I capture the event, all the "globally settled tags" via sentry_set_tag are dropped

This is due to this line which replace the globals tags by the currently settled one:
https://github.com/getsentry/sentry-native/blob/master/src/sentry_scope.c#L281

As the comment in code suggest, should the tags be merged?
If it is the case then we cannot replace all tags anymore...
Maybe a function should be added to add "volatile" tags only on the current event?

In the mean time how can I retrieve the originals globals tags and add it to my new tags object?

When does the problem happen

Each time I capture an event with specific key tags settled

  • During build
  • [X ] During run-time
  • When capturing a hard crash

Environment

WSL Linux Ubuntu 20.04 64bits

Steps To Reproduce

Call this line with new_tags containing others tags value and then capture event

sentry_value_set_by_key(event, "tags", new_tags);

@Swatinem
Copy link
Member

This is indeed a missing feature, yes.

@ashwoods ashwoods added enhancement New feature or request area: api area: core SDK parity Behavior that other SDKs provide and we are missing or implement differently labels Sep 27, 2023
@kahest
Copy link
Member

kahest commented Sep 27, 2023

@supervacuus @Swatinem looks like this has been implemented with 047cf98#diff-84d598b3c4cc08e878cc83551a26a234018ddf3e72537e8b19ff62f5e83c8975 - can you confirm?

related PR: #650

@Swatinem
Copy link
Member

Yes I believe it was

@github-project-automation github-project-automation bot moved this from Needs Discussion to Done in Mobile & Cross Platform SDK Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api area: core enhancement New feature or request SDK parity Behavior that other SDKs provide and we are missing or implement differently
Projects
Archived in project
Development

No branches or pull requests

4 participants