BrowserTracing id property missing in v7 #5635
Answered
by
AbhiPrasad
martinkwan
asked this question in
Q&A
|
Hi, I am trying to check if Sentry's APM is initialized with this line of code. This worked in v6, but while migrating to v7 BrowserTracing removed it's ID property and now Typescript is giving me this error: Is there fix for this typescript error? I know the static property id is removed in v7 from BrowserTracing |
Answered by
AbhiPrasad
Aug 29, 2022
Replies: 2 comments 4 replies
|
For now though, you can use the import { hasTracingEnabled } from '@sentry/tracing';sentry-javascript/packages/tracing/src/utils.ts Lines 18 to 29 in f563eae |
4 replies
Answer selected by
AbhiPrasad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For now though, you can use the
hasTracingEnabledutil from@sentry/tracingto check if Sentry's APM is initialized. We recommend usingsampleRateto decide to turn on tracing or not.sentry-javascript/packages/tracing/src/utils.ts
Lines 18 to 29 in f563eae