Skip to content

BrowserTracing id property missing in v7 #5635

Answered by AbhiPrasad
martinkwan asked this question in Q&A
Discussion options

You must be logged in to vote

For now though, you can use the hasTracingEnabled util from @sentry/tracing to check if Sentry's APM is initialized. We recommend using sampleRate to decide to turn on tracing or not.

import { hasTracingEnabled } from '@sentry/tracing';

/**
* Determines if tracing is currently enabled.
*
* Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.
*/
export function hasTracingEnabled(
maybeOptions?: Pick<Options, 'tracesSampleRate' | 'tracesSampler'> | undefined,
): boolean {
const client = getCurrentHub().getCl…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@martinkwan
Comment options

@AbhiPrasad
Comment options

@martinkwan
Comment options

@AbhiPrasad
Comment options

Answer selected by AbhiPrasad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants