diff --git a/docs/platforms/javascript/common/configuration/tree-shaking.mdx b/docs/platforms/javascript/common/configuration/tree-shaking.mdx index 168cd8fcb3df3..29fe10525d155 100644 --- a/docs/platforms/javascript/common/configuration/tree-shaking.mdx +++ b/docs/platforms/javascript/common/configuration/tree-shaking.mdx @@ -120,7 +120,7 @@ Replacing this flag with `false` will tree shake any SDK code that's related to `__SENTRY_TRACING__` must not be replaced with `false` when you're using any - tracing-related SDK features (for example,`Sentry.startTransaction()`). This + tracing-related SDK features (for example,`Sentry.startSpan()`). This flag is intended to be used in combination with packages like `@sentry/next` or `@sentry/sveltekit`, which automatically include the tracing functionality. diff --git a/docs/platforms/javascript/common/tracing/index.mdx b/docs/platforms/javascript/common/tracing/index.mdx index 00065d3b7c953..5761afcadeb79 100644 --- a/docs/platforms/javascript/common/tracing/index.mdx +++ b/docs/platforms/javascript/common/tracing/index.mdx @@ -31,12 +31,12 @@ With [tracing](/product/insights/overview/), Sentry automatically tracks your so ## Configure - Enable tracing by configuring the sampling rate for transactions. Set the - sample rate for your transactions by either: + Enable tracing by configuring the sampling rate for traces. Set the sample + rate as follows: - Enable tracing by setting the sample rate for your transactions. + Enable tracing by setting the sample rate for your traces. @@ -75,13 +75,37 @@ See Automa You can also manually start spans to instrument specific parts of your code. This is useful when you want to measure the performance of a specific operation or function. -- Tracing APIs: - Find information about APIs for custom tracing instrumentation +- Tracing APIs: Find + information about APIs for custom tracing instrumentation - Instrumentation: Find information about manual instrumentation with the Sentry SDK - Sending Span Metrics: Learn how to capture metrics on your spans +## Disabling Tracing + +If you want to disable tracing, you _should not_ set `tracesSampleRate` at +all. Setting it to `0` will not disable tracing, it will simply never send any +traces to Sentry. +Instead, neither `tracesSampleRate` nor `tracesSampler` should be defined in your SDK config to fully disable tracing. + + + In addition, you can set `__SENTRY_TRACING__` to `false` to ensure the tracing code + is removed from your production build. This will result in{" "} + trace propagation{" "} + being disabled as well. See{" "} + Tree Shaking{" "} + for more information. + + ## Next Steps