-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): Apply scope attributes to metrics #18738
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
Conversation
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
05093f8 to
0c36d47
Compare
0c36d47 to
219e1ef
Compare
219e1ef to
3c13f13
Compare
chargome
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of this!
|
|
||
| // Enrich metric with contextual attributes | ||
| const enrichedMetric = _enrichMetricAttributes(beforeMetric, client, currentScope); | ||
| const { user, attributes: scopeAttributes } = getCombinedScopeData(getIsolationScope(), currentScope); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: user is always defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also surprised but yes 😅
sentry-javascript/packages/core/src/scope.ts
Line 163 in 1535106
| this._user = {}; |
3c13f13 to
4b4d0d3
Compare
Applies scope attributes to metrics, analogously to how we apply them to logs (see #18184). Added unit and integration tests.
closes #18160