-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: Add docs for custom browser tracing routing instrumentation #9113
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
}); | ||
|
||
// Somewhere, instrument your router like this: | ||
myRouter.on("routeChange", (route) => { |
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.
We should add a note about setting correct route name for pageload as well, we want to avoid un-paramaterized transactions.
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 guess this is mostly about updating the pageload span, right? 🤔 or should we document how to emit a pageload span?
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.
yeah updating the pageload span, I think most frameworks will be fine with emitting pageload as soon as possible.
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 opened a PR: getsentry/sentry-javascript#10633 to make this easier, as documenting this showed that there is def. room for improvement there!
@@ -19,3 +19,5 @@ Sentry.init({ | |||
tracesSampleRate: 1.0, | |||
}); | |||
``` | |||
|
|||
<PlatformContent includePath="performance/automatic-instrumentation-custom-routing" /> |
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.
l: should this documentation live under "Automatic Instrumentation"? Isn't this rather fitting for "Custom Instrumentation"?
I guess there's a case for both, given we're mentioning browserTracingIntegration
directly above but maybe it's enough to link to custom from the "Autmatic Instrumentation" page
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.
yeah, IMHO I'd generally restructure this a bit in a follow up - we should rethink this with a bit of time! Currently that's basically the "browser tracing" page, in reality, even though the name is not necessarily clear on that.
I have updated this based on the changes in v7.101.0. Now it is a "full" example including updating the pageload span. |
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.
Nice!
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.
LGTM, just a few small tweaks
platform-includes/performance/automatic-instrumentation-custom-routing/javascript.mdx
Outdated
Show resolved
Hide resolved
platform-includes/performance/automatic-instrumentation-custom-routing/javascript.mdx
Outdated
Show resolved
Hide resolved
platform-includes/performance/automatic-instrumentation-custom-routing/javascript.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Liza Mock <liza.mock@sentry.io>
This fixes one forgotten line in the react docs, and adds a section to react & browser auto-instrument docs on how to implement your own navigation instrumentation using the new APIs.