-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Programatic way to indicate that a pageload / navigation transaction has completed #14810
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
Comments
I think it's worth exploring this direction. Essentially, such a function would be syntactic sugar around this code: const rootSpan = getRootSpan(getActiveSpan())
if (rootSpan && spanToJSON(rootSpan).op === "pageload") {
rootSpan.end();
} which is not a lot but of course less unintuitive than calling Importantly though: If we added this API, we'd also need to ensure that the pageload span is active until this function is called. Or IOW, we should deactivate all idle span heuristics to end the span. Which is another bundle size increase and makes this a bit more complex. Update: Users can also today set the parameters for our idle spans in a way that they're factually disabled by making sure, that our idle parameters would end the span definitely after their manual call to end the span: Sentry.init({
integrations: [
Sentry.browserTracingIntegration({
idleTimeout: 60_000,
finalTimeout: 60_000,
childSpanTimeout: 60_000,
})
]
}) (feel free to adjust as necessary) |
Any updates on this? |
We are scheduling this work in a bit more concretely now, hopefully we have updates to share in the near-ish future. We still need to figure the exact semantics of this out, though! |
Problem Statement
When setting duration on pageload / navigation transactions today, we use a heuristic approach to determine the timing
From internal conversation:
Being a heuristic, there are many opinions about what constitutes the completion of a pageload or navigation event. Rather than addressing all these alternate opinions, it would be interesting to give developers a programatic way to indicate that the pageload, or navigation, is complete.
Solution Brainstorm
I could imagine something like this:
Similar to Time to Full Display is handled.
The text was updated successfully, but these errors were encountered: