-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(browser): Add onRequestSpanStart
hook to browser tracing integration
#15979
Conversation
size-limit report 📦
|
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.
The hook sounds reasonable to me! Can we add an integration test for it?
yes tests are missing yet - hence pr in draft mode |
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
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.
Thx for adding tests and the updated description! Sounds reasonable to me to ship this with #15980 in mind.
This PR adds a hook to the browser tracing integration that allows to hook into the creation of request spans (fetch & xhr) and set attributes based on headers (can be extended with additional info in the future).
Primarily I was gonna use this to set an attribute/op on prefetch client requests in Next.js to show them as
http.client.prefetch
.