diff --git a/docs/platforms/javascript/common/configuration/sampling.mdx b/docs/platforms/javascript/common/configuration/sampling.mdx index 10390b4e898b2..0bb775bea4b77 100644 --- a/docs/platforms/javascript/common/configuration/sampling.mdx +++ b/docs/platforms/javascript/common/configuration/sampling.mdx @@ -58,18 +58,12 @@ By default, none of these options are set, meaning no transactions will be sent ## Sampling Context Data -### Default Sampling Context Data - -The information contained in the object passed to the when a transaction is created varies by platform and integration. - - - -### Custom Sampling Context Data - -When using custom instrumentation to create a span, the `tracesSampler` function will automatically receive the span `name` and the initial span `attributes` to use in its sampling decision. +When a span is started, the `tracesSampler` function will automatically receive the span `name` and the initial span `attributes` to use in its sampling decision. Additionally, it will also receive a `parentSampled` boolean indicating whether the parent span was sampled. This data can be used to make a more informed decision about whether to sample the span. +Please note that the `name` passed to `tracesSampler` may not be the exact same name that is eventually sent to Sentry. The name may be updated during the lifetime of the span, but the `name` passed to `tracesSampler` will always be the initial name. For example, the `name` for `http.server` spans will usually not be parametrized yet when passed to `tracesSampler`, so instead of `GET /users/:id` you may see a name of `GET /users/123`. + ## Inheritance diff --git a/platform-includes/performance/default-sampling-context-platform/javascript.mdx b/platform-includes/performance/default-sampling-context-platform/javascript.mdx deleted file mode 100644 index 15d141bb41209..0000000000000 --- a/platform-includes/performance/default-sampling-context-platform/javascript.mdx +++ /dev/null @@ -1,13 +0,0 @@ -It includes at least the following: - -```typescript -// contents of `samplingContext` -{ - // human-readable identifier, like "GET /users" - name: string; - // if this transaction has a parent, its sampling decision - parentSampled: boolean; - // The initial attributes passed to the span - attributes: Record; -} -``` diff --git a/platform-includes/performance/default-sampling-context/javascript.mdx b/platform-includes/performance/default-sampling-context/javascript.mdx deleted file mode 100644 index a6a92c2a989d8..0000000000000 --- a/platform-includes/performance/default-sampling-context/javascript.mdx +++ /dev/null @@ -1 +0,0 @@ -