Skip to content

Commit 25272c2

Browse files
authored
Update README.md
Clarify which span attributes are updated/added and `probablistic_filtering_ratio` behavior
1 parent 04b8bda commit 25272c2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

processor/cascadingfilterprocessor/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,24 @@ The following configuration options should be configured as desired:
1111
- `policies` (no default): Policies used to make a sampling decision
1212
- `spans_per_second` (default = 1500): Maximum total number of emitted spans per second
1313
- `probabilistic_filtering_ratio` (default = 0.2): Ratio of spans that are always probabilistically filtered
14-
(hence might be used for metrics calculation)
14+
(hence might be used for metrics calculation). The ratio is specified as portion of output spans (defined by
15+
`spans_per_second`) rather than input spans. So the default filtering rate of `0.2` and default max span rate of
16+
`1500` produces at most `300` probabilistically sampled spans per second.
1517

1618
The following configuration options can also be modified:
1719
- `decision_wait` (default = 30s): Wait time since the first span of a trace before making a filtering decision
1820
- `num_traces` (default = 50000): Number of traces kept in memory
1921
- `expected_new_traces_per_sec` (default = 0): Expected number of new traces (helps in allocating data structures)
2022

23+
## Updated span attributes
24+
25+
The processor modifies each span attributes, by setting following two attributes:
26+
- `sampling.rule`: describing if `probabilistic` or `filtered` policy was applied
27+
- `sampling.probability`: describing the effective sampling rate in case of `probabilistic` rule. E.g. if there were `5000`
28+
spans evaluated in a given second, with `1500` max total spans per second and `0.2` filtering ratio, at most `300` spans
29+
would be selected by such rule. This would effect in having `sampling.probability=0.06` (`300/5000=0.6`). If such value is already
30+
set by head-based (or other) sampling, it's multiplied by the calculated value.
31+
2132
## Policy configuration
2233

2334
Each defined policy is evaluated with order as specified in config. There are several properties:

0 commit comments

Comments
 (0)