Skip to content

fix(browser): Ensure request from diagnoseSdkConnectivity doesn't create span #17280

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

Merged
merged 4 commits into from
Aug 1, 2025

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Aug 1, 2025

Our diagnoseSdkConnectivity API makes a fetch POST request to Sentry's ingestion endpoint to simulate an actual SDK request. This API is injected into the example pages created by our wizards when setting up Sentry.

Usually, our SDK does not create spans or breadcrumbs for SDK-made requests to Sentry. However, for browser fetch, we do this by simply obtaining an unpatched fetch call in our transport. So we don't have a check in our fetch tracing instrumentation that bails if it encounters a Sentry ingestion endpoint URL. (In contrast, our XHR instrumentation does exactly that.)

This PR therefore ensures that we suppress tracing (and breadcrumbs) for diagnoseSdkConnectivity-made requests. suppressTracing works well here. We could also get an native fetch implementation here but I'd say we only try this if for some reason suppressTracing doesn't work.

closes https://linear.app/getsentry/issue/BE-542/investigate-spans-issue-in-ingest-since-version-10

@Lms24 Lms24 changed the title fix(browser): Ensure request from diagnoseSdkConnectivity does not create span fix(browser): Ensure request from diagnoseSdkConnectivity doesn't create span Aug 1, 2025
@Lms24 Lms24 self-assigned this Aug 1, 2025
Copy link

linear bot commented Aug 1, 2025

@Lms24 Lms24 enabled auto-merge (squash) August 1, 2025 09:58
@Lms24 Lms24 merged commit 8f4d56f into develop Aug 1, 2025
183 checks passed
@Lms24 Lms24 deleted the lms/fix-browser-diagnose-sdk-connectivity-no-span branch August 1, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants