diff --git a/CHANGELOG.md b/CHANGELOG.md index 68d01cdce384..6fd671757241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +### Important Changes + +- **ref: Deprecate `enableTracing` (12897)** + +The `enableTracing` option has been deprecated and will be removed in the next major version. We recommend removing it +in favor of the `tracesSampleRate` and `tracesSampler` options. If you want to enable performance monitoring, please set +the `tracesSampleRate` to a sample rate of your choice, or provide a sampling function as `tracesSampler` option +instead. If you wan't to disable performance monitoring, remove the `tracesSampler` and `tracesSampleRate` options. + Work in this release was contributed by @GitSquared. Thank you for your contribution! ## 8.17.0 diff --git a/packages/core/src/utils/hasTracingEnabled.ts b/packages/core/src/utils/hasTracingEnabled.ts index 97463d9d5e5e..5e673bc08caa 100644 --- a/packages/core/src/utils/hasTracingEnabled.ts +++ b/packages/core/src/utils/hasTracingEnabled.ts @@ -17,6 +17,7 @@ export function hasTracingEnabled( } const options = maybeOptions || getClientOptions(); + // eslint-disable-next-line deprecation/deprecation return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options); } diff --git a/packages/node/src/sdk/index.ts b/packages/node/src/sdk/index.ts index 2ac62a2b5b91..0fb7774827f9 100644 --- a/packages/node/src/sdk/index.ts +++ b/packages/node/src/sdk/index.ts @@ -92,6 +92,7 @@ function shouldAddPerformanceIntegrations(options: Options): boolean { } // We want to ensure `tracesSampleRate` is not just undefined/null here + // eslint-disable-next-line deprecation/deprecation return options.enableTracing || options.tracesSampleRate != null || 'tracesSampler' in options; } diff --git a/packages/types/src/options.ts b/packages/types/src/options.ts index 8b2dbebdd574..d6c407d60bd0 100644 --- a/packages/types/src/options.ts +++ b/packages/types/src/options.ts @@ -89,9 +89,13 @@ export interface ClientOptions