Skip to content

Add Release as default tag to Sentry Metrics #3788

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

Closed
daniel-johns-99 opened this issue Apr 29, 2024 · 5 comments
Closed

Add Release as default tag to Sentry Metrics #3788

daniel-johns-99 opened this issue Apr 29, 2024 · 5 comments

Comments

@daniel-johns-99
Copy link

The Sentry Metrics added on #3590 are good, however it would be helpful for React Native by default to include the Release as a tag. Even if this is a plugin it would mean being able to leverage the same method Sentry uses to fetch the Release information.

@krystofwoldrich
Copy link
Member

Hi @daniel-johns-99,
thank you for the suggestion, we will discuss this internally and keep you posted in here.

For completeness here is a code snipped ho tags can be added at the moment:

Sentry.metrics.increment("button_click", 1, {
  tags: { browser: "Firefox", app_version: "1.0.0" },
});

https://docs.sentry.io/platforms/react-native/metrics/

@krystofwoldrich
Copy link
Member

@daniel-johns-99 Are you currently adding the release tag manually?

@daniel-johns-99
Copy link
Author

Hi @krystofwoldrich, yes we've had to create a auxilliary method to add the release as a tag. I think it would make sense for it to be there by default, given the release tag is a first class tag in quiet a few other parts of Sentry.

I released I commented on the wrong issue, but would you consider adding in a beforeEmit event as the SDK impl suggests where the release can be added into all metrics as a tag
https://develop.sentry.dev/sdk/metrics/#hooks

@krystofwoldrich
Copy link
Member

@daniel-johns-99 Thank you for the reply, I can confirm adding the release tag by default, but we are going to add the beforeEmit hook which will make this much easier.

@getsantry getsantry bot removed the status in GitHub Issues with 👀 2 May 2, 2024
@krystofwoldrich krystofwoldrich moved this from Needs Discussion to Backlog in [DEPRECATED] Mobile SDKs May 3, 2024
@antonis
Copy link
Collaborator

antonis commented Nov 18, 2024

Closing since the metrics api was deprecated in JS (8.37.0) and will be removed with #4278.
Please reopen if needed 🙇

@antonis antonis closed this as completed Nov 18, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in [DEPRECATED] Mobile SDKs Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
Development

No branches or pull requests

3 participants