Skip to content

Commit 0292fcf

Browse files
committed
leverage admonition, decrease fallback sampling rate, and improve language
1 parent 7fa4942 commit 0292fcf

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

solutions/observability/apm/transaction-sampling.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,32 +299,36 @@ When a trace originates in Service A and then calls Service B, the sampling rate
299299
service.name: B
300300
- sample_rate: 0.5
301301
service.name: A
302-
- sample_rate: 1.0 # Fallback: always set a default
302+
- sample_rate: 0.1 # Fallback: always set a default
303303
```
304304

305305
- Because Service A is the root of the trace, its policy (0.5) is applied while Service B's policy (0.3) is ignored.
306306
- If instead the trace began in Service B (and then passed to Service A), the policy for Service B would apply.
307307

308-
> **Key point**: Tail‑based sampling rules are evaluated at the *trace level* based on which service initiated the distributed trace, not the service of the transaction or span.
308+
:::{note}
309+
Tail‑based sampling rules are evaluated at the *trace level* based on which service initiated the distributed trace, not the service of the transaction or span.
310+
:::
309311

310312
### Example configuration 3 [_example_configuration_3]
311313

312-
Policies are evaluated **in order** and applies the first one whose match conditions are all met. That means, in practice, order policies from most specific (narrow matchers) to most general, ending with a catch-all (fallback).
314+
Policies are evaluated **in order** and the first one that meets all match conditions is applied. That means, in practice, order policies from most specific (narrow matchers) to most general, ending with a catch-all (fallback).
313315

314316
```yaml
315317
# Example A: prioritize service origin, then failures
316318
- sample_rate: 0.2
317319
service.name: A
318320
- sample_rate: 0.5
319321
trace.outcome: failure
320-
- sample_rate: 1.0 # catch-all
322+
- sample_rate: 0.1 # catch-all
323+
```
321324

325+
```yaml
322326
# Example B: prioritize failures, then a specific service
323327
- sample_rate: 0.2
324328
trace.outcome: failure
325329
- sample_rate: 0.5
326-
service.name: alice
327-
- sample_rate: 1.0
330+
service.name: A
331+
- sample_rate: 0.1
328332
```
329333

330334
- In Example A, traces from Service A are sampled at 20%, and all other failed traces (regardless of service) are sampled at 50%.

0 commit comments

Comments
 (0)