Skip to content
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

Potential Trace propagation bug in browser SDK #13277

Closed
2 tasks
Lms24 opened this issue Aug 8, 2024 · 2 comments
Closed
2 tasks

Potential Trace propagation bug in browser SDK #13277

Lms24 opened this issue Aug 8, 2024 · 2 comments
Labels
Feature: Tracing Package: browser Issues related to the Sentry Browser SDK

Comments

@Lms24
Copy link
Member

Lms24 commented Aug 8, 2024

Description

Just discovered this trace in the Sentry UI:

There seems to be an orphaned http.server transaction which gets a sentry-trace header with a span id that doesn't exist:

Image

Assuming the orphaned transaction was started after the navigation span finished. It's expected that there's no frontend transaction, given we don't start http.client spans as root spans. However, the parent span id of the orphaned transaction does not exist (=> orphan). Why did this happen? My guess is that we propagate an incorrect span id here. We should propagate the navigation span's id as the parent span id.

To do:

  • reproduce if possible
  • double check trace propagation logic when there's no active span
@Lms24 Lms24 added Type: Bug Package: browser Issues related to the Sentry Browser SDK Feature: Tracing labels Aug 8, 2024
@Lms24
Copy link
Member Author

Lms24 commented Aug 8, 2024

Side note: There's something else super weird going on in this trace. TIme stamps from server and client are completely off. This raises questions:

  • is the one problem related to the other
  • who's wrong? server or client?
  • Is this an SDK issue? If so, which SDK's issue?

@Lms24
Copy link
Member Author

Lms24 commented Sep 13, 2024

Turns out everything described here is expected behavior with the current browser tracing model.
The non-existing parent span exists because we have to propagate a span id in sentry-trace. Since there is no active span at the time, we propagate a random id.

@Lms24 Lms24 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Tracing Package: browser Issues related to the Sentry Browser SDK
Projects
None yet
Development

No branches or pull requests

2 participants