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: pipeline/processors/sampling.md
+29-2Lines changed: 29 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,7 @@ pipeline:
204
204
205
205
With this tail-based sampling configuration, a sample set of ingested traces will select only the spans with status codes marked as `ERROR` to the standard output.
206
206
207
+
207
208
### Condition: string_attribute
208
209
209
210
This conditional allows traces to be sampled based on specific span or resource attributes. Users can define key-value filters (e.g., http.method=POST) to selectively capture relevant traces.
@@ -212,7 +213,13 @@ This conditional allows traces to be sampled based on specific span or resource
| `key` | Specifies the span or resource attribute to match (e.g., "service.name"). | |
214
215
| `values` | Defines an array of accepted values for the attribute. A trace is sampled if any span contains a matching key-value pair: `["payment-processing"]`| |
215
-
| `match_type` | Defines how attributes are compared: `strict`ensures exact value matching, while `exists` checks if the attribute is present regardless of its value (note that string type is enforced) | `strict` |
216
+
| `match_type` | Defines how attributes are compared: `strict`ensures exact value matching, `exists` checks if the attribute is present regardless of its value, and `regex` enables regular expression pattern matching | `strict` |
217
+
218
+
#### Match Types
219
+
220
+
- **`strict`**: Exact value matching (case-sensitive)
221
+
- **`exists`**: Checks if the attribute key is present, regardless of its value
222
+
- **`regex`**: Matches values using regular expression patterns
This tail-based sampling configuration waits 2 seconds before making a decision. It samples traces based on string matching key value pairs. Traces are sampled if the key `http.method` is set to `GET` or if spans or resources have a key `service.name`.
273
+
This tail-based sampling configuration waits 2 seconds before making a decision. It samples traces based on string matching key value pairs:
274
+
275
+
- Traces with `http.method` exactly equal to `GET`
276
+
- Traces that have a `service.name` attribute (any value)
277
+
- Traces with `http.url` starting with `https://api.` or ending with `/health`
278
+
- Traces with `error.message` containing timeout, connection failed, or rate limit patterns
0 commit comments