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

Add Release as default tag to Sentry Metrics #3788

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

Add Release as default tag to Sentry Metrics #3788

daniel-johns-99 opened this issue Apr 29, 2024 · 4 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

2 participants