tracesSampler not working
See original GitHub issueVersion
@nuxtjs/sentry: 5.1.7 nuxt: 2.15.3
Sentry configuration
{
dsn: 'secret',
tracing: {
tracesSampler: (samplingContext) => {
// equivalent to returning 0
return false
},
vueOptions: {
tracing: true,
tracingOptions: {
hooks: ['mount', 'update'],
timeout: 2000,
trackComponents: true,
},
},
}
}
Reproduction Link
Steps to reproduce
What is Expected?
Trace sample rate should use value returned by tracesSampler. In this case tracing should be disabled if traceSampler return false. Returning a number value e.g 0.2 also doesn’t work.
What is actually happening?
Trace sample rate value still using default value 1
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
tracesSampleRate works but tracesSampler does not #3292
Description. When I use tracesSampleRate , it works just fine. However, tracesSampler does not function as expected. Even when set to return 1, ......
Read more >Sampling for JavaScript - Sentry Documentation
If tracesSampler is not defined, but there's a parent sampling decision, the parent sampling decision will be used. If tracesSampler is not defined...
Read more >Guidelines for Performance Monitoring
If tracesSampler is not defined, but there's a parent sampling decision, ... This property returns a SpanProtocol if a running transaction is bound...
Read more >Exclude nextjs api url from sentry events - Stack Overflow
The BeforeSend and DenyUrl are options to filter error events, not transactions. For transaction events, please use the tracesSampler ...
Read more >Filtering Sentry spans no one looks at — brandur.org
... spans to be pretty useful for analyzing performance problems. ... ClientOptions{ Dsn: dsn, Environment: environment, TracesSampler: ...
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
This should be fixed in the module so re-opening.
Actually
tracesSampler
is not part of thetracing
object but as you saidconfig
(eventuallyclientConfig
). So it works as expected.