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

fix(metrics): Map statsd to metric_bucket #11505

Merged
merged 2 commits into from Apr 9, 2024
Merged

fix(metrics): Map statsd to metric_bucket #11505

merged 2 commits into from Apr 9, 2024

Conversation

s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Apr 9, 2024

statsd is the envelope item type and metric_bucket is the data category. I also changed some variable names to keep a better distinction.

Copy link
Contributor

github-actions bot commented Apr 9, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 80.54 KB (+0.07% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 71.52 KB (+0.08% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 75.54 KB (+0.08% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 65.16 KB (+0.09% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 35.46 KB (+0.15% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 35.34 KB (+0.14% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.53 KB (+0.03% 🔺)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.54 KB (+0.03% 🔺)
@sentry/browser - Webpack (gzipped) 22.74 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 78.65 KB (+0.08% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 70.02 KB (+0.08% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 35.8 KB (+0.1% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 25.18 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 220.42 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 108.23 KB (+0.11% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 75.49 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 39.03 KB (+0.1% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 72.01 KB (+0.07% 🔺)
@sentry/react - Webpack (gzipped) 22.78 KB (+0.04% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 89.85 KB (+0.05% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 53.99 KB (+0.08% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.3 KB (0%)

@@ -26,8 +26,8 @@ export type DataCategory =
| 'monitor'
// Feedback type event (v2)
| 'feedback'
// Statsd type event for metrics
| 'statsd'
// Metrics sent via the statsd or metrics envelope items. `namespace` defines which namespace(s) will be affected
Copy link
Member

Choose a reason for hiding this comment

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

what does namespace relate to in this comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

That relates to the rate limiting: https://develop.sentry.dev/sdk/rate-limiting/
But it is about the quota_limit responses and might be confusing in this context. Should I remove it? The first sentence should be enough I think.

Copy link
Member

Choose a reason for hiding this comment

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

yeah I was just confused about the comment in this context as "namespace" is not mentioned in this entry - IMHO OK to remove this or move this comment closer to where namespace is actually used?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I moved the comment to where namespaces is defined

@s1gr1d s1gr1d requested a review from mydea April 9, 2024 14:39
@@ -1,7 +1,7 @@
// This type is used in various places like Client Reports and Rate Limit Categories
// See:
// - https://develop.sentry.dev/sdk/rate-limiting/#definitions
// - https://github.com/getsentry/relay/blob/c3b339e151c1e548ede489a01c65db82472c8751/relay-common/src/constants.rs#L139-L152
// - https://github.com/getsentry/relay/blob/ec791fed9c2260688f25ea6a6d53ab913927e9a5/relay-base-schema/src/data_category.rs#L91
Copy link
Member

Choose a reason for hiding this comment

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

l: Maybe we can just reference master branch here? 🤔 but not sure, feel free to disregard.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't add it from master, as the file was moved already (why I changed the link). If the link would have been from master, it would've been harder to actually find the correct file as you would just get a 404. But as I could still see the old implementation, it was easier for me to find the new place of the code :)

@s1gr1d s1gr1d enabled auto-merge (squash) April 9, 2024 14:56
@s1gr1d s1gr1d merged commit ad2685a into v7 Apr 9, 2024
103 checks passed
@s1gr1d s1gr1d deleted the sig-remove-statsd branch April 9, 2024 15:02
@AbhiPrasad AbhiPrasad mentioned this pull request Apr 10, 2024
s1gr1d added a commit that referenced this pull request Apr 11, 2024
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
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.

None yet

2 participants