question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tracesSampler not working

See original GitHub issue

Version

@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:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rchlcommented, Apr 1, 2022

This should be fixed in the module so re-opening.

0reactions
rchlcommented, Aug 26, 2022

Actually tracesSampler is not part of the tracing object but as you said config (eventually clientConfig). So it works as expected.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found