Skip to content

Commit c8f31de

Browse files
authored
Processor plugin docs updates (#2369)
* docs: prcessors: content-modifier: fix config params table - Add missing `action` configuration parameter - Sort configuration parameters alphabetically - Add Oxford comma in converted_type description Applies to #2368 Signed-off-by: Eric D. Schabell <eric@schabell.org> * docs: processors: labels: fix config params and hash algorithm - Sort configuration parameters alphabetically - Fix hash example to say SHA-256 (not SHA-1) to match implementation Applies to #2368 Signed-off-by: Eric D. Schabell <eric@schabell.org> * docs: processors: metrics-selector: fix config params table - Sort configuration parameters alphabetically - Fix context default value typo (metrics_name -> metric_name) - Fix context possible value (delete_label -> delete_label_value) Applies to #2368 Signed-off-by: Eric D. Schabell <eric@schabell.org> * docs: processors: sampling: fix config params and descriptions - Add missing `debug` configuration parameter - Sort all configuration parameter tables alphabetically - Fix swapped min_spans/max_spans descriptions in span count condition - Add Default column to main config table - Normalize table separator styles Applies to #2368 Signed-off-by: Eric D. Schabell <eric@schabell.org> --------- Signed-off-by: Eric D. Schabell <eric@schabell.org>
1 parent c55dcd8 commit c8f31de

File tree

4 files changed

+34
-32
lines changed

4 files changed

+34
-32
lines changed

pipeline/processors/content-modifier.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ The following configuration parameters are available:
5454

5555
| Key | Description |
5656
| ----------- | ----------- |
57+
| `action` | Specifies the type of [action](#actions) to perform on the content. |
5758
| `context` | Specifies the [context](#contexts) where the modifications will happen. |
59+
| `converted_type` | Defines the data type to perform the conversion. Possible values: `string`, `boolean`, `int`, and `double`. |
5860
| `key` | Specifies the name of the key that will be used to apply the modification. |
59-
| `value` | The role of this parameter changes based on the [action](#actions) type. |
6061
| `pattern` | Defines a regular expression pattern. This property is only used by the `extract` [action](#actions). |
61-
| `converted_type` | Defines the data type to perform the conversion. Possible values: `string`, `boolean`, `int` and `double`. |
62+
| `value` | The role of this parameter changes based on the [action](#actions) type. |
6263

6364
### Actions
6465

pipeline/processors/labels.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Only [YAML configuration files](../../administration/configuring-fluent-bit/yaml
1616

1717
| Key | Description |
1818
| --- | ----------- |
19-
| `update` | Updates an existing key with a value into metrics. The key/value pair is required. If the specified key doesn't exist, the operation silently fails and has no effect. |
20-
| `insert` | Inserts a new key with a value into metrics. The key/value pair is required. |
21-
| `upsert` | Upserts a specific key with a value, the `upsert` operation will try to update the value of the key. If the specified key doesn't exist, a new key will be created. The key/value pair is required. |
2219
| `delete` | Deletes a key from the labels of metrics. The key/value pair is required. If the specified key doesn't exist, the operation silently fails and has no effect. |
2320
| `hash` | Replaces the key value with a hash generated by the SHA-256 algorithm from the specified label name. The generated binary value is set as a hex string. |
21+
| `insert` | Inserts a new key with a value into metrics. The key/value pair is required. |
22+
| `update` | Updates an existing key with a value into metrics. The key/value pair is required. If the specified key doesn't exist, the operation silently fails and has no effect. |
23+
| `upsert` | Upserts a specific key with a value, the `upsert` operation will try to update the value of the key. If the specified key doesn't exist, a new key will be created. The key/value pair is required. |
2424

2525
### Update example
2626

@@ -124,7 +124,7 @@ pipeline:
124124

125125
### Hash example
126126

127-
The following example applies the SHA-1 algorithm for the value of the key `hostname`:
127+
The following example applies the SHA-256 algorithm for the value of the key `hostname`:
128128

129129
{% tabs %}
130130
{% tab title="fluent-bit.yaml" %}

pipeline/processors/metrics-selector.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ The metrics selector processor supports the following configuration parameters:
1010

1111
| Key | Description | Default |
1212
| --- | ----------- | ------- |
13-
| `metric_name` | The string that determines which metrics are affected by this processor, depending on the active [matching operation](#matching-operations). | _none_ |
14-
| `context` | Specifies matching context. Possible values: `metric_name` or `delete_label`. | `metrics_name` |
1513
| `action` | Specifies whether to include or exclude matching metrics. Possible values: `INCLUDE` or `EXCLUDE`. | _none_ |
16-
| `operation_type` | Specifies the [matching operation](#matching-operations) to apply to the value of `metric_name`. Possible values: `PREFIX` or `SUBSTRING`. | _none_ |
14+
| `context` | Specifies matching context. Possible values: `metric_name` or `delete_label_value`. | `metric_name` |
1715
| `label` | Specifies a label key and value pair. | _none_ |
16+
| `metric_name` | The string that determines which metrics are affected by this processor, depending on the active [matching operation](#matching-operations). | _none_ |
17+
| `operation_type` | Specifies the [matching operation](#matching-operations) to apply to the value of `metric_name`. Possible values: `PREFIX` or `SUBSTRING`. | _none_ |
1818

1919
## Matching operations
2020

pipeline/processors/sampling.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ Only [YAML configuration files](../../administration/configuring-fluent-bit/yaml
1212

1313
This processor uses the following configuration parameters:
1414

15-
| Key | Description |
16-
| --- | ----------- |
17-
| `type` | The type of sampling to perform. Possible values: `probabilistic` ([head sampling](#head-sampling)) or `tail` ([tail sampling](#tail-sampling)). |
18-
| `sampling_settings` | Contains key/value pairs for different sampling settings. These settings vary by `type`. |
19-
| `conditions` | An array of objects where each object specifies a different [condition](#conditions) for `tail` sampling. The possible items in each object vary by `conditions.type`. |
15+
| Key | Description | Default |
16+
| --- | ----------- | ------- |
17+
| `conditions` | An array of objects where each object specifies a different [condition](#conditions) for `tail` sampling. The possible items in each object vary by `conditions.type`. | _none_ |
18+
| `debug` | Enables debug mode, which prints the trace and its spans. | `false` |
19+
| `sampling_settings` | Contains key/value pairs for different sampling settings. These settings vary by `type`. | _none_ |
20+
| `type` | The type of sampling to perform. Possible values: `probabilistic` ([head sampling](#head-sampling)) or `tail` ([tail sampling](#tail-sampling)). | _none_ |
2021

2122
## Head sampling
2223

@@ -98,10 +99,10 @@ This condition samples traces based on span duration. It uses `threshold_ms_low`
9899
The latency condition uses the following `conditions` configuration parameters:
99100

100101
| Key | Description | Default |
101-
| --- | ----------- | --------|
102-
| `type` | Sets the condition type. For the latency condition, this value must be `latency`. | _none_ |
103-
| `threshold_ms_low` | Specifies the lower latency threshold. Traces with a duration less than or equal to this value will be sampled. | `0` |
102+
| --- | ----------- | ------- |
104103
| `threshold_ms_high` | Specifies the upper latency threshold. Traces with a duration greater than or equal to this value will be sampled. | `0` |
104+
| `threshold_ms_low` | Specifies the lower latency threshold. Traces with a duration less than or equal to this value will be sampled. | `0` |
105+
| `type` | Sets the condition type. For the latency condition, this value must be `latency`. | _none_ |
105106

106107
The following example waits five seconds before making a decision. It then samples traces based on latency, capturing short traces of 200&nbsp;ms or less and long traces of 3000&nbsp;ms or more. Traces between 200&nbsp;ms and 3000&nbsp;ms won't be sampled unless another condition applies.
107108

@@ -146,10 +147,10 @@ This condition samples traces that have specific span counts defined in a config
146147
The span count condition uses the following `conditions` configuration parameters:
147148

148149
| Key | Description | Default |
149-
| --- | ----------- | --------|
150+
| --- | ----------- | ------- |
151+
| `max_spans` | Specifies the maximum number of spans a trace can have to be sampled. | _none_ |
152+
| `min_spans` | Specifies the minimum number of spans a trace must have to be sampled. | _none_ |
150153
| `type` | Sets the condition type. For the span count condition, this value must be `span_count`. | _none_ |
151-
| `max_spans` | Specifies the minimum number of spans a trace must have to be sampled. | _none_ |
152-
| `min_spans` | Specifies the maximum number of spans a trace can have to be sampled. | _none_ |
153154

154155
The following example configuration waits five seconds before making a decision. It then samples traces with at least three spans but no more than five spans. Traces with less than three spans or greater than five spans won't be sampled unless another condition applies.
155156

@@ -194,9 +195,9 @@ This condition samples traces based on span status codes (`OK`, `ERROR`, `UNSET`
194195
The status code condition uses the following `conditions` configuration parameters:
195196

196197
| Key | Description | Default |
197-
| --- | ----------- | --------|
198-
| `type` | Sets the condition type. For the status code condition, this value must be `status_code`. | _none_ |
198+
| --- | ----------- | ------- |
199199
| `status_codes` | Defines an array of span status codes (`OK`, `ERROR`, `UNSET`) to filter traces. Traces are sampled if any span matches a listed status code. For example, `status_codes: [ERROR, UNSET]` captures traces with errors or unset statuses. | _none_ |
200+
| `type` | Sets the condition type. For the status code condition, this value must be `status_code`. | _none_ |
200201

201202
The following example configuration samples only spans with the `ERROR` status code.
202203

@@ -240,11 +241,11 @@ This conditional lets you sample traces based on specific span or resource attri
240241
The string attribute condition uses the following `conditions` configuration parameters:
241242

242243
| Key | Description | Default |
243-
| --- | ----------- | --------|
244-
| `type` | Sets the condition type. For the string attribute condition, this value must be `string_attribute`. | _none_ |
244+
| --- | ----------- | ------- |
245245
| `key` | Specifies the span or resource attribute to match (for example, `"service.name"`). | _none_ |
246-
| `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"]` | _none_ |
247246
| `match_type` | Defines how attributes are compared: `strict` ensures exact value matching (and is case-sensitive), `exists` checks if the attribute is present regardless of its value, and `regex` uses regular expression pattern matching. | `strict` |
247+
| `type` | Sets the condition type. For the string attribute condition, this value must be `string_attribute`. | _none_ |
248+
| `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"]` | _none_ |
248249

249250
The following example configuration waits two seconds before making a decision. It then samples traces based on string matching key-value pairs:
250251

@@ -313,12 +314,12 @@ This condition samples traces based on numeric attribute values of a defined key
313314
The numeric attribute condition uses the following `conditions` configuration parameters:
314315

315316
| Key | Description | Default |
316-
| --- | ----------- | --------|
317-
| `type` | Sets the condition type. For the numeric attribute condition, this value must be `numeric_attribute`. | _none_ |
317+
| --- | ----------- | ------- |
318318
| `key` | Specifies the span or resource attribute to match (for example, `"service.name"`). | _none_ |
319-
| `min_value`| The minimum inclusive value for the numeric attribute. Traces with values greater than or equal to the `min_value` are sampled. | _none_ |
320-
| `max_value` | The maximum inclusive value for the numeric attribute. Traces with values less than or equal to the `max_value` are sampled. | _none_ |
321319
| `match_type` | This defines how attribute values are evaluated: `strict` matches exact values, `exists` checks if the attribute is present, regardless of its value. | `strict` |
320+
| `max_value` | The maximum inclusive value for the numeric attribute. Traces with values less than or equal to the `max_value` are sampled. | _none_ |
321+
| `min_value` | The minimum inclusive value for the numeric attribute. Traces with values greater than or equal to the `min_value` are sampled. | _none_ |
322+
| `type` | Sets the condition type. For the numeric attribute condition, this value must be `numeric_attribute`. | _none_ |
322323

323324
The following example configuration samples only spans with the key `http.status code` with numeric values between `400` and `504` inclusive.
324325

@@ -364,9 +365,9 @@ This condition samples traces based on a boolean attribute value of a defined ke
364365
The Boolean attribute condition uses the following `conditions` configuration parameters:
365366

366367
| Key | Description | Default |
367-
| --- | ----------- | --------|
368-
| `type` | Sets the condition type. For the Boolean attribute condition, this value must be `boolean_attribute`. | _none_ |
368+
| --- | ----------- | ------- |
369369
| `key` | Specifies the span or resource attribute to match (for example, `"service.name"`). | _none_ |
370+
| `type` | Sets the condition type. For the Boolean attribute condition, this value must be `boolean_attribute`. | _none_ |
370371
| `value` | Expected boolean value: `true` or `false` | _none_ |
371372

372373
The following example configuration waits two seconds before making a decision. It then samples traces that have the key `user.logged` set to `false`.
@@ -412,7 +413,7 @@ This condition samples traces based on metadata stored in the W3C `trace_state`
412413
The trace state condition uses the following `conditions` configuration parameters:
413414

414415
| Key | Description | Default |
415-
| --- | ----------- | --------|
416+
| --- | ----------- | ------- |
416417
| `type` | Sets the condition type. For the trace state condition, this value must be `trace_state`. | _none_ |
417418
| `values` | Defines a list of key, value pairs to match against the `trace_state`. A trace is sampled if any of the specified values exist in the `trace_state` field. Matching follows OR logic, meaning at least one value must be present for sampling to occur. | _none_ |
418419

0 commit comments

Comments
 (0)