Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/utils/hasTracingEnabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 1 addition & 0 deletions packages/node/src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
6 changes: 5 additions & 1 deletion packages/types/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
tracesSampleRate?: number;

/**
* If this is enabled, transactions and trace data will be generated and captured.
* If this is enabled, spans and trace data will be generated and captured.
* This will set the `tracesSampleRate` to the recommended default of `1.0` if `tracesSampleRate` is undefined.
* Note that `tracesSampleRate` and `tracesSampler` take precedence over this option.
*
* @deprecated This option is deprecated and will be removed in the next major version. If you want to enable performance
* monitoring, please use the `tracesSampleRate` or `tracesSampler` options instead. If you wan't to disable performance
* monitoring, remove the `tracesSampler` and `tracesSampleRate` options.
*/
enableTracing?: boolean;

Expand Down