-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(browser): Improve idle span handling (#12065)
Closes #12051 This PR does two things: 1. Ensures we add helpful attributes to idle spans more consistently. We now add the `sentry.idle_span_finish_reason` attribute always for idle spans, not only when op == `ui.action.click`. This should also make it easier to debug stuff etc, and I see no reason to not always set this. Additionally, we also keep the number of spans we discarded (if any) for easier debugging too (as `sentry.idle_span_discarded_spans`). 2. We ensure that idle spans cannot exceed the configured `finalTimeout`. Previously, due to the order of things, it was possible that we ended a span very late, if it had a child span with a very late end timestamp (as we took the last child span timestamp). Possibly this could lead to overly long transactions. I think 2, combined with the fact that later we _do_ filter out child spans that ended after idle span, lead to the incorrect-length spans.
- Loading branch information
Showing
2 changed files
with
183 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters