Skip to content

Commit

Permalink
wording suggestions and note
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphofmann committed Feb 13, 2024
1 parent c1be000 commit 5240adc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/platforms/apple/common/usage/distributed-tracing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ Remember that in order to propagate trace information through your whole distrib

### tracePropagationTargets

Per default, the Cocoa SDK will attach the `sentry-trace` and `baggage` headers to all outgoing requests. You
can use the allowlist `tracePropagationTargets` to specify to which URLs the Cocoa SDK should send these headers.
You can put string or regexes into the allowlist, and the SDK then only attaches the `sentry-trace` and `baggage`
headers to all outgoing requests whose destination contains a string in the list or matches a regex in the list.

**The `tracePropagationTargets` option matches the entire request URL, not just the domain. Using stricter regex to match certain parts of the URL ensures that requests don't unnecessarily have additional headers attached.**
The Cocoa SDK will attach the `sentry-trace` and `baggage` headers to all outgoing requests by default. To narrow
this down to only specific URLs, add those URLs to the `tracePropagationTargets` allowlist, (you can use both
string and regexes). The SDK will then only attach the `sentry-trace` and `baggage` headers to outgoing requests
whose destination either contains a string or matches a regex in your allowlist.

<Note>
The `tracePropagationTargets` option matches the entire request URL, not just the domain. Using stricter regex to match certain parts of the URL ensures that requests don't unnecessarily have additional headers attached.
</Note>

Since the value of `tracePropagationTargets` is `['.*']` by default, tracing headers are attached to all requests unless otherwise specified.

Expand Down

0 comments on commit 5240adc

Please sign in to comment.