tracingOrigins doesn't work as expected
See original GitHub issueIs there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which package are you using?
SDK Version
7.4.1
Framework Version
7.4.1
Link to Sentry event
No response
Steps to Reproduce
Sentry.init({
dsn: sentryDns,
integrations: [new Integrations.BrowserTracing()],
release: releaseName,
environment,
tracesSampleRate: 0.1,
browserTracingOptions: {
tracingOrigins: [], // <----
},
...
})
I tried also like this,
Sentry.init({
dsn: sentryDns,
integrations: [new Integrations.BrowserTracing({
tracingOrigins: [], // <----
})],
...
both ways sentry-trace
and baggage
still shows in some requests headers.
Expected Result
sentry-trace
and baggage
shouldn’t be added to any request.
Actual Result
sentry-trace
and baggage
are attach to some requests header.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Troubleshooting for JavaScript - Sentry Documentation
By default, Sentry does not capture errors when a resource (like an image or a css file) fails to load. If you would...
Read more >TracingOptions | Sentry JavaScript SDKs - v5.21.1
Return false if you don't want a span for the given url. By default it uses the tracingOrigins options as a url match....
Read more >Guidelines for Performance Monitoring
This document covers how SDKs should add support for Performance Monitoring with Distributed Tracing . This should give an overview of the APIs...
Read more >Request header field sentry-trace is not allowed by Access ...
So after some investigations, I came across this tracingOrigins property that can be set using integrations like this:
Read more >Tracing for the Frontend to the Backend - YouTube
Join Dustin Bailey (Solutions Engineer @Sentry) as he shows how developers can trace those pesky performance issues to poor-performing API ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah ok so that’s the issue, we have a check against empty arrays in the code:
https://github.com/getsentry/sentry-javascript/blob/3203558550e7fd94982d0defe8df65922e1f8342/packages/tracing/src/browser/browsertracing.ts#L145
Opened https://github.com/getsentry/sentry-javascript/pull/5583 to fix this!
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it
Status: Backlog
orStatus: In Progress
, I will leave it alone … forever!“A weed is but an unloved flower.” ― Ella Wheeler Wilcox 🥀