Skip to content

Commit b3ac351

Browse files
Merge pull request #1895 from fluent/alexakreizinger/sc-136284/update-fluent-bit-docs-pipeline-processors
2 parents abda423 + 1365cdd commit b3ac351

File tree

5 files changed

+53
-46
lines changed

5 files changed

+53
-46
lines changed

.vale.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BasedOnStyles = FluentBit
1111
FluentBit.Terms = YES
1212
FluentBit.Titles = YES
1313
FluentBit.FutureTense = NO
14-
FluentBit.Headings = NO
14+
FluentBit.Headings = YES
1515
FluentBit.Passive = NO
1616
FluentBit.Subjunctive = NO
1717
FluentBit.Colons = NO

pipeline/processors/content-modifier.md

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,76 @@
1-
# Content Modifier
1+
# Content modifier
22

3-
The **content_modifier** processor allows you to manipulate the messages, metadata/attributes and content of Logs and Traces.
3+
The _content modifier_ processor lets you manipulate the content, metadata, and attributes of logs and traces.
44

5-
Similar to the functionality exposed by filters, this processor presents a unified mechanism to perform such operations for data manipulation. The most significant difference is that processors perform better than filters, and when chaining them, there are no encoding/decoding performance penalties.
5+
Similar to how filters work, this processor uses a unified mechanism to perform operations for data manipulation. The most significant difference is that processors perform better than filters, and when chaining them, there are no encoding/decoding performance penalties.
66

77
{% hint style="info" %}
88

9-
**Note:** Both processors and this specific component can be enabled only by using
10-
the YAML configuration format. Classic mode configuration format doesn't support processors.
9+
Only [YAML configuration files](../administration/configuring-fluent-bit/yaml/README.md) support processors.
1110

1211
{% endhint %}
1312

1413
## Contexts
1514

16-
The processor, works on top of what we call a __context__, meaning _the place_ where the content modification will happen. We provide different contexts to manipulate the desired information, the following contexts are available:
15+
The content modifier relies on _context_, meaning the place where the content modification will happen. Fluent Bit provides different contexts to manipulate the desired information.
1716

18-
| Context Name | Signal | Description |
19-
| -- | -- | -- |
20-
| `attributes` | Logs | Modify the attributes or metadata of a Log record. |
21-
| `body` | Logs | Modify the content of a Log record. |
22-
| `span_name` | Traces | Modify the name of a Span. |
23-
| `span_kind` | Traces | Modify the kind of a Span. |
24-
| `span_status` | Traces | Modify the status of a Span. |
25-
| `span_attributes` | Traces | Modify the attributes of a Span. |
17+
The following contexts are available:
2618

19+
| Name | Telemetry type | Description |
20+
| ---- | -------------- | ----------- |
21+
| `attributes` | Logs | Modifies the attributes or metadata of a log record. |
22+
| `body` | Logs | Modifies the content of a log record. |
23+
| `span_name` | Traces | Modifies the name of a span. |
24+
| `span_kind` | Traces | Modifies the kind of a span. |
25+
| `span_status` | Traces | Modifies the status of a span. |
26+
| `span_attributes` | Traces | Modifies the attributes of a span. |
2727

28-
### OpenTelemetry Contexts
2928

30-
In addition, we provide special contexts to operate on data that follows an __OpenTelemetry Log Schema__, all of them operates on shared data across a group of records:
29+
### OpenTelemetry contexts
3130

32-
| Context Name | Signal | Description |
33-
| -- | -- | -- |
34-
| `otel_resource_attributes` | Logs | Modify the attributes of the Log Resource. |
35-
| `otel_scope_name` | Logs | Modify the name of a Log Scope. |
36-
| `otel_scope_version` | Logs | Modify version of a Log Scope. |
37-
| `otel_scope_attributes` | Logs | Modify the attributes of a Log Scope. |
31+
Additionally, Fluent Bit provides specific contexts for modifying data that follows the OpenTelemetry log schema. All of these contexts operate on shared data across a group of records.
3832

39-
> TIP: if your data is not following the OpenTelemetry Log Schema and your backend or destination for your logs expects to be in an OpenTelemetry schema, take a look at the processor called OpenTelemetry Envelope that you can use in conjunbction with this processor to transform your data to be compatible with OpenTelemetry Log schema.
33+
The following contexts are available:
4034

41-
## Configuration Parameters
35+
| Name | Telemetry type | Description |
36+
| ---- | -------------- | ----------- |
37+
| `otel_resource_attributes` | Logs | Modifies the attributes of the log resource. |
38+
| `otel_scope_name` | Logs | Modifies the name of a log scope. |
39+
| `otel_scope_version` | Logs | Modifies version of a log scope. |
40+
| `otel_scope_attributes` | Logs | Modifies the attributes of a log scope. |
41+
42+
43+
{% hint style="info" %}
44+
45+
If your data doesn't follow the OpenTelemetry log schema, but your log destination expects to be in that format, you can use the [OpenTelemetry envelope](../pipeline/processors/opentelemetry-envelope) processor to transform your data. You can then pass that transformed data through the content modifier filter and use OpenTelemetry contexts accordingly.
46+
47+
{% endhint %}
48+
49+
## Configuration parameters
50+
51+
The following configuration parameters are available:
4252

4353
| Key | Description |
44-
| :---------- | :--- |
45-
| context | Specify the context where the modifications will happen (more details above).The following contexts are available: `attributes`, `body`, `span_name`, `span_kind`, `span_status`, `span_attributes`, `otel_resource_attributes`, `otel_scope_name`, `otel_scope_version`, `otel_scope_attributes`. |
46-
| key | Specify the name of the key that will be used to apply the modification. |
47-
| value | Based on the action type, `value` might required and represent different things. Check the detailed information for the specific actions. |
48-
| pattern | Defines a regular expression pattern. This property is only used by the `extract` action. |
49-
| converted_type | Define the data type to perform the conversion, the available options are: `string`, `boolean`, `int` and `double` . |
54+
| ----------- | ----------- |
55+
| `context` | Specifies the [context](#contexts) where the modifications will happen. |
56+
| `key` | Specifies the name of the key that will be used to apply the modification. |
57+
| `value` | The role of this parameter changes based on the [action](#actions) type. |
58+
| `pattern` | Defines a regular expression pattern. This property is only used by the `extract` [action](#actions). |
59+
| `converted_type` | Defines the data type to perform the conversion. Possible values: `string`, `boolean`, `int` and `double`. |
5060

5161
### Actions
5262

53-
The actions specify the type of operation to run on top of a specific key or content from a Log or a Trace. The following actions are available:
63+
The actions specify the type of operation to run on top of a specific key or content from a log or a trace. The following actions are available:
5464

5565
| Action | Description |
5666
| ------- | ------------------------------------------------------------ |
57-
| `insert` | Insert a new key with a value into the target context. The `key` and `value` parameters are required. |
58-
| `upsert` | Given a specific key with a value, the `upsert` operation will try to update the value of the key. If the key does not exist, the key will be created. The `key` and `value` parameters are required. |
59-
| `delete` | Delete a key from the target context. The `key` parameter is required. |
60-
| `rename` | Change the name of a key. The `value` set in the configuration will represent the new name. The `key` and `value` parameters are required. |
61-
| `hash` | Replace the key value with a hash generated by the SHA-256 algorithm, the binary value generated is finally set as an hex string representation. The `key` parameter is required. |
62-
| `extract` | Allows to extact the value of a single key as a list of key/value pairs. This action needs the configuration of a regular expression in the `pattern` property . The `key` and `pattern` parameters are required. For more details check the examples below. |
63-
| `convert` | Convert the data type of a key value. The `key` and `converted_type` parameters are required. |
67+
| `insert` | Inserts a new key with a value into the target context. The `key` and `value` parameters are required. |
68+
| `upsert` | Given a specific key with a value, the `upsert` operation will try to update the value of the key. If the key does not exist, a new key will be created. The `key` and `value` parameters are required. |
69+
| `delete` | Deletes a key from the target context. The `key` parameter is required. |
70+
| `rename` | Changes the name of a key. The `value` set in the configuration will represent the new name. The `key` and `value` parameters are required. |
71+
| `hash` | Replaces the key value with a hash generated by the SHA-256 algorithm, the binary value generated is finally set as a hex string representation. The `key` parameter is required. |
72+
| `extract` | Extracts the value of a single key as a list of key/value pairs. This action needs the configuration of a regular expression in the `pattern` property. The `key` and `pattern` parameters are required. |
73+
| `convert` | Converts the data type of a key value. The `key` and `converted_type` parameters are required. |
6474

6575
#### Insert example
6676

@@ -81,7 +91,7 @@ pipeline:
8191
action: insert
8292
key: "color"
8393
value: "blue"
84-
94+
8595
outputs:
8696
- name : stdout
8797
match: '*'
@@ -271,4 +281,4 @@ pipeline:
271281
```
272282

273283
{% endtab %}
274-
{% endtabs %}
284+
{% endtabs %}

vale-styles/FluentBit/Acronyms.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ exceptions:
8080
- SCSS
8181
- SDK
8282
- SDS
83+
- SHA
8384
- SIEM
8485
- SLA
8586
- SQL

vale-styles/FluentBit/Spelling-exceptions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ unary
200200
Unary
201201
unmuted
202202
unsort
203+
upsert
203204
UUIDs
204205
Vectra
205206
Vercel

vale-styles/FluentBit/WordList.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ swap:
3737
cellular data: mobile data
3838
cellular network: mobile network
3939
chapter: documents|pages|sections
40-
check box: checkbox
41-
check: select
42-
click on: click|click in
4340
Container Engine: Kubernetes Engine
4441
content type: media type
4542
curated roles: predefined roles
@@ -58,7 +55,6 @@ swap:
5855
in order to: to
5956
# ingest: import|load
6057
k8s: Kubernetes
61-
long press: touch & hold
6258
network IP address: internal IP address
6359
omnibox: address bar
6460
open-source: open source
@@ -72,7 +68,6 @@ swap:
7268
synch: sync
7369
tablename: table name
7470
tablet: device
75-
touch: tap
7671
url: URL
7772
vs\.: versus
7873
whitelist: allowlist

0 commit comments

Comments
 (0)