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
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ A trace is a **collection of events that are related to each other**. For exampl

Trace sampling ensures that **either all events of a trace are sampled, or none**. That is, these rules **always yield the same sampling decision** for every event in the same trace. This requires the cooperation of SDKs and thus allows sampling only by `project`, `release`, `environment`, and `transaction` name.

To achieve trace sampling, SDKs pass all fields that can be sampled by [Dynamic Sampling Context (DSC)](/sdk/performance/dynamic-sampling-context/) (defined [here](https://getsentry.github.io/relay/relay_sampling/dsc/struct.DynamicSamplingContext.html)) as they propagate traces. _This ensures that every event from the same trace comes with the same DSC._
To achieve trace sampling, SDKs pass all fields that can be sampled by [Dynamic Sampling Context (DSC)](/sdk/foundations/trace-propagation/dynamic-sampling-context/) (defined [here](https://getsentry.github.io/relay/relay_sampling/dsc/struct.DynamicSamplingContext.html)) as they propagate traces. _This ensures that every event from the same trace comes with the same DSC._

![Trace Sampling](./images/traceSampling.png)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ If Performance Monitoring is both supported by the SDK and enabled in the client

- operation: `http.client`
- description: `$METHOD $url` (uppercase HTTP method), e.g. `GET https://sentry.io`
- HTTP requests must be enhanced with a [`sentry-trace` HTTP header](/sdk/telemetry/traces/#header-sentry-trace) to support [distributed tracing](https://docs.sentry.io/product/sentry-basics/tracing/distributed-tracing)
- HTTP requests must be enhanced with a [`baggage` HTTP header](/sdk/telemetry/traces/dynamic-sampling-context/#baggage-header) to support [dynamic sampling](/sdk/telemetry/traces/dynamic-sampling-context/)
- HTTP requests must be enhanced with a [`sentry-trace` HTTP header](/sdk/foundations/trace-propagation/#sentry-trace-header) to support [distributed tracing](https://docs.sentry.io/product/sentry-basics/tracing/distributed-tracing)
- HTTP requests must be enhanced with a [`baggage` HTTP header](/sdk/foundations/trace-propagation/dynamic-sampling-context/#baggage-header) to support [dynamic sampling](/sdk/foundations/trace-propagation/dynamic-sampling-context/)
- span status must match HTTP response status code ([see Span status to HTTP status code mapping](/sdk/foundations/transport/event-payloads/span/))
- when network error occurs, span status must be set to `internal_error`
- span data must follow the [Span Data Conventions](/sdk/telemetry/traces/span-data-conventions/)
Expand All @@ -80,7 +80,7 @@ The HTTP Client integration should have 3 configuration options:
- `failedRequestStatusCodes` defaults to `500 - 599`, this configuration option accepts a `List` of `HttpStatusCodeRange` which is a range of HTTP status code -> `min` to `max` or a single `status_code`.
- The SDK will only capture HTTP Client errors if the HTTP Response status code is within the defined ranges in `failedRequestStatusCodes`.
- If the language has a `Range` type, it should be used instead of `HttpStatusCodeRange`.
- `failedRequestTargets` defaults to (`.*`), this configuration option accepts a `List` of `String` that may be Regular expressions as well, similar to <Link to="/sdk/telemetry/traces/#tracepropagationtargets">tracePropagationTargets</Link>.
- `failedRequestTargets` defaults to (`.*`), this configuration option accepts a `List` of `String` that may be Regular expressions as well, similar to <Link to="/sdk/foundations/trace-propagation/#trace-propagation-targets">tracePropagationTargets</Link>.
- The SDK will only capture HTTP Client errors if the HTTP Request URL is a match for any of the `failedRequestsTargets`.
- While the keys of sensitive HTTP headers (e.g. `Authorization` and `Cookie`) are included, their values must be replaced with `"[Filtered]"` (also see <Link to="/sdk/expected-features/data-handling/#sensitive-data">Data Handling: Sensitive Data</Link>).

Expand Down
2 changes: 1 addition & 1 deletion develop-docs/sdk/foundations/state-management/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: State Management
description: How SDKs manage contextual state — scopes, attributes, breadcrumbs, and the deprecated Hub model.
sidebar_order: 4
sidebar_order: 3
---

<PageGrid />
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ The propagation context (trace ID, span ID, baggage/DSC) **MUST** be stored on t
- Generating `sentry-trace` and `baggage` headers for outgoing requests
- Connecting error events to the active trace (tracing without performance)

The isolation scope is the canonical location for the propagation context. When no active span exists, the propagation context from the isolation scope **MUST** be used. See [Tracing without Performance](/sdk/telemetry/traces/tracing-without-performance/) for details.
The isolation scope is the canonical location for the propagation context. When no active span exists, the propagation context from the isolation scope **MUST** be used. See [Trace Propagation: Default Propagation](/sdk/foundations/trace-propagation/#default-propagation) for details.

</SpecSection>

Expand Down
Loading
Loading