You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/components/processors.mdx
+30-8Lines changed: 30 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,19 +78,41 @@ processors:
78
78
tail_sampling:
79
79
decision_wait: 1s
80
80
policies:
81
-
- name: and-policy,
82
-
type: and,
81
+
- name: and-policy
82
+
type: and
83
83
and:
84
84
and_sub_policy:
85
-
- name: test-policy-9,
86
-
type: string_attribute,
85
+
- name: path-policy
86
+
type: string_attribute
87
87
string_attribute:
88
-
key: http.url,
88
+
key: http.url
89
89
values: ["\/users"]
90
90
enabled_regex_matching: true
91
-
- name: error-policy,
92
-
type: status_code,
93
-
status_code: {status_codes: [ERROR, UNSET]}
91
+
- name: error-policy
92
+
type: status_code
93
+
status_code:
94
+
status_codes: ["ERROR", "UNSET"]
95
+
```
96
+
97
+
In the next example we will sample 20% of the spans that present an error:
98
+
99
+
```yaml
100
+
processors:
101
+
tail_sampling:
102
+
decision_wait: 1s
103
+
policies:
104
+
- name: and-policy
105
+
type: and
106
+
and:
107
+
and_sub_policy:
108
+
- name: error-policy
109
+
type: status_code
110
+
status_code:
111
+
status_codes: ["ERROR", "UNSET"]
112
+
- name: probabilistic-policy
113
+
type: probabilistic
114
+
probabilistic:
115
+
sampling_percentage: 20
94
116
```
95
117
96
118
It is highly recommended that you take a look into the [README](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/tailsamplingprocessor/README.md) of this component to understand all the available policies.
0 commit comments