Skip to content

ref: Deprecate enableTracing #12897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@

- "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` option and set the
`tracesSampleRate` to `0` or `undefined`.

Work in this release was contributed by @GitSquared. Thank you for your contribution!

## 8.17.0
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 set the `tracesSampleRate` or
* `tracesSampler` options instead. If you wan't to disable performance monitoring, remove the `tracesSampler` option
* and set the `tracesSampleRate` to `0` or `undefined`.
*/
enableTracing?: boolean;

Expand Down
Loading