@@ -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
1618The 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
2334Each defined policy is evaluated with order as specified in config. There are several properties:
0 commit comments