-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(metrics): Add default server.address attribute on server runtimes
#18242
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
dev-packages/node-integration-tests/suites/public-api/metrics/server-address/test.ts
Show resolved
Hide resolved
Lms24
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.
I like the pattern. As discussed, we'll likely need a hook like this one for spans and logs as well, so this makes sense to me. Naming wise, we can still add (pre|post)ProcessMetric later on should we need it, so I think this is a good naming choice (and inline with the processEvent hooks on our Integration interface).
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.
|
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
Attaches a
server.addressattribute to all captured metrics on aserverRuntimeClientDid this by emitting a new
processMetrichook in core, that we listen to in theserverRuntimeClient. This way we do not need to re-export all metrics functions from server runtime packages and still only get a minimal client bundle size bump.Added integration tests for node + cloudflare
closes #18240
closes https://linear.app/getsentry/issue/JS-1178/attach-serveraddress-as-a-default-attribute-to-metrics