Skip to content

Commit 3e533aa

Browse files
Merge branch 'master' into out_azure_kusto_workload_identity
Signed-off-by: Tanmaya Panda <[email protected]>
2 parents 2f336ba + 7d86f57 commit 3e533aa

File tree

16 files changed

+108
-130
lines changed

16 files changed

+108
-130
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,18 @@ possible. For example:
123123
### Vale
124124

125125
The Fluent Bit maintainers use the [Vale](https://vale.sh/docs/) plugin, which lints
126-
pull requests and adds suggestions to improve style and clarity.
126+
pull requests and adds suggestions to improve style and clarity. Most Vale tests are
127+
at the `suggestion` level and won't block merging.
128+
129+
The following tests are at a `error` level and will prevent merging:
130+
131+
- [NonStandardQuotes](https://github.com/fluent/fluent-bit-docs/blob/master/vale-styles/FluentBit/NonStandardQuotes.yml):
132+
[Use standard quotes](https://developers.google.com/style/quotation-marks#straight-and-curly-quotation-marks).
133+
By default, Google Docs and Microsoft Word turn standard straight quotes into "smart"
134+
curly quotes. If you copy-paste from one of these tools, you must correct the quotes
135+
back to straight quotes. You can also turn off smart quotes
136+
in [Google Docs](https://support.google.com/docs/thread/217182974/can-i-turn-smart-quotes-off-in-a-google-doc?hl=en)
137+
or [Microsoft Word](https://support.microsoft.com/en-us/office/smart-quotes-in-word-and-powerpoint-702fc92e-b723-4e3d-b2cc-71dedaf2f343)
138+
to prevent this problem.
139+
- [Repetition](https://github.com/errata-ai/vale/blob/v3/testdata/styles/Markup/Repetition.yml):
140+
Checks for the same word used twice in succession.

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@
146146
* [Labels](pipeline/processors/labels.md)
147147
* [Metrics Selector](pipeline/processors/metrics-selector.md)
148148
* [OpenTelemetry Envelope](pipeline/processors/opentelemetry-envelope.md)
149+
* [Sampling](pipeline/processors/sampling.md)
149150
* [SQL](pipeline/processors/sql.md)
150-
* [Traces](pipeline/processors/traces.md)
151151
* [Filters as processors](pipeline/processors/filters.md)
152152
* [Conditional processing](pipeline/processors/conditional-processing.md)
153153
* [Filters](pipeline/filters/README.md)

pipeline/inputs/http.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: The HTTP input plugin allows you to send custom records to an HTTP
1212
| port | The port for Fluent Bit to listen on | 9880 |
1313
| tag_key | Specify the key name to overwrite a tag. If set, the tag will be overwritten by a value of the key. | |
1414
| buffer_max_size | Specify the maximum buffer size in KB to receive a JSON message. | 4M |
15-
| buffer_chunk_size | This sets the chunk size for incoming incoming JSON messages. These chunks are then stored/managed in the space available by buffer_max_size. | 512K |
15+
| buffer_chunk_size | This sets the chunk size for incoming JSON messages. These chunks are then stored/managed in the space available by buffer_max_size. | 512K |
1616
| successful_response_code | It allows to set successful response code. `200`, `201` and `204` are supported. | 201 |
1717
| success_header | Add an HTTP header key/value pair on success. Multiple headers can be set. Example: `X-Custom custom-answer` | |
1818
| threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
@@ -34,7 +34,7 @@ The http input plugin allows Fluent Bit to open up an HTTP port that you can the
3434
#### How to set tag
3535

3636
The tag for the HTTP input plugin is set by adding the tag to the end of the request URL. This tag is then used to route the event through the system.
37-
For example, in the following curl message below the tag set is `app.log**. **` because the end end path is `/app_log`:
37+
For example, in the following curl message below the tag set is `app.log**. **` because the end path is `/app_log`:
3838

3939
### Curl request
4040

pipeline/inputs/prometheus-remote-write.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This input plugin allows you to ingest a payload in the Prometheus remote-write
1313
| listen | The address to listen on | 0.0.0.0 |
1414
| port | The port for Fluent Bit to listen on | 8080 |
1515
| buffer\_max\_size | Specify the maximum buffer size in KB to receive a JSON message. | 4M |
16-
| buffer\_chunk\_size | This sets the chunk size for incoming incoming JSON messages. These chunks are then stored/managed in the space available by buffer_max_size. | 512K |
16+
| buffer\_chunk\_size | This sets the chunk size for incoming JSON messages. These chunks are then stored/managed in the space available by buffer_max_size. | 512K |
1717
|successful\_response\_code | It allows to set successful response code. `200`, `201` and `204` are supported.| 201 |
1818
| tag\_from\_uri | If true, tag will be created from uri, e.g. api\_prom\_push from /api/prom/push, and any tag specified in the config will be ignored. If false then a tag must be provided in the config for this input. | true |
1919
| uri | Specify an optional HTTP URI for the target web server listening for prometheus remote write payloads, e.g: /api/prom/push | |

pipeline/inputs/splunk.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The **splunk** input plugin handles [Splunk HTTP HEC](https://docs.splunk.com/Do
1010
| port | The port for Fluent Bit to listen on | 9880 |
1111
| tag_key | Specify the key name to overwrite a tag. If set, the tag will be overwritten by a value of the key. | |
1212
| buffer_max_size | Specify the maximum buffer size in KB to receive a JSON message. | 4M |
13-
| buffer_chunk_size | This sets the chunk size for incoming incoming JSON messages. These chunks are then stored/managed in the space available by buffer_max_size. | 512K |
13+
| buffer_chunk_size | This sets the chunk size for incoming JSON messages. These chunks are then stored/managed in the space available by buffer_max_size. | 512K |
1414
| successful_response_code | It allows to set successful response code. `200`, `201` and `204` are supported. | 201 |
1515
| splunk\_token | Specify a Splunk token for HTTP HEC authentication. If multiple tokens are specified (with commas and no spaces), usage will be divided across each of the tokens. | |
1616
| store\_token\_in\_metadata | Store Splunk HEC tokens in the Fluent Bit metadata. If set false, they will be stored as normal key-value pairs in the record data. | true |

pipeline/inputs/standard-input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If no parser is configured for the stdin plugin, it expects *valid JSON* input d
1717
1. A JSON object with one or more key-value pairs: `{ "key": "value", "key2": "value2" }`
1818
3. A 2-element JSON array in [Fluent Bit Event](../../concepts/key-concepts.md#event-or-record) format, which may be:
1919
* `[TIMESTAMP, { "key": "value" }]` where TIMESTAMP is a floating point value representing a timestamp in seconds; or
20-
* from Fluent Bit v2.1.0, `[[TIMESTAMP, METADATA], { "key": "value" }]` where TIMESTAMP has the same meaning as above and and METADATA is a JSON object.
20+
* from Fluent Bit v2.1.0, `[[TIMESTAMP, METADATA], { "key": "value" }]` where TIMESTAMP has the same meaning as above and METADATA is a JSON object.
2121

2222
Multi-line input JSON is supported.
2323

pipeline/outputs/postgresql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ According to the parameters you have set in the configuration file, the plugin w
1212

1313
> **NOTE:** If you are not familiar with how PostgreSQL's users and grants system works, you might find useful reading the recommended links in the "References" section at the bottom.
1414
15-
A typical installation normally consists of a self-contained database for Fluent Bit in which you can store the output of one or more pipelines. Ultimately, it is your choice to to store them in the same table, or in separate tables, or even in separate databases based on several factors, including workload, scalability, data protection and security.
15+
A typical installation normally consists of a self-contained database for Fluent Bit in which you can store the output of one or more pipelines. Ultimately, it is your choice to store them in the same table, or in separate tables, or even in separate databases based on several factors, including workload, scalability, data protection and security.
1616

1717
In this example, for the sake of simplicity, we use a single table called `fluentbit` in a database called `fluentbit` that is owned by the user `fluentbit`. Feel free to use different names. Preferably, for security reasons, do not use the `postgres` user \(which has `SUPERUSER` privileges\).
1818

pipeline/processors/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Fluent Bit offers the following processors:
1818
- [Metrics Selector](metrics-selector.md): Choose which metrics to keep or discard.
1919
- [OpenTelemetry Envelope](opentelemetry-envelope.md): Transform logs into an
2020
OpenTelemetry-compatible format.
21-
- [SQL](sql.md): Use SQL queries to extract log content.
22-
- [Traces](traces.md): Trace sampling designed with a pluggable architecture,
21+
- [Sampling](sampling.md): Trace sampling designed with a pluggable architecture,
2322
allowing easy extension to support multiple sampling strategies and backends.
23+
- [SQL](sql.md): Use SQL queries to extract log content.
2424
- [Filters](filters.md): Any filter can be used as a processor.
2525

2626
## Features

pipeline/processors/metrics-selector.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,45 @@
11
# Metrics Selector
22

3-
The **metric_selector** processor allows you to select metrics to include or exclude (similar to the `grep` filter for logs).
3+
The _Metrics Selector_ processor lets you choose which metrics to include or exclude, similar to the [Grep](../pipeline/filters/grep) filter for logs.
44

55
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=326269f3-cfea-472d-9169-1de32c142b90" />
66

7-
## Configuration Parameters <a id="config"></a>
7+
## Configuration parameters
88

9-
The native processor plugin supports the following configuration parameters:
9+
The Metrics Selector processor supports the following configuration parameters:
1010

1111
| Key | Description | Default |
1212
| :---------- | :--- | :--- |
13-
| Metric\_Name | Keep metrics in which the metric of name matches with the actual name or the regular expression. | |
14-
| Context | Specify matching context. Currently, metric\_name and delete\_label\_value are only supported. | `Metrics_Name` |
15-
| Action | Specify the action for specified metrics. INCLUDE and EXCLUDE are allowed. | |
16-
| Operation\_Type | Specify the operation type of action for metrics payloads. PREFIX and SUBSTRING are allowed. | |
17-
| Label | Specify a label key and value pair. | |
13+
| `metric_name` | The string that determines which metrics are affected by this processor, depending on the active [matching operation](#matching-operations). | |
14+
| `context` | Specifies matching context. Possible values: `metric_name` or `delete_label`. | `metrics_name` |
15+
| `action` | Specifies whether to include or exclude matching metrics. Possible values: `INCLUDE` or `EXCLUDE`. | |
16+
| `operation_type` | Specifies the [matching operation](#matching-operations) to apply to the value of `metric_name`. Possible values: `PREFIX` or `SUBSTRING`. | |
17+
| `label` | Specifies a label key and value pair. | |
1818

19-
## Configuration Examples <a id="config_example"></a>
19+
## Matching operations
2020

21-
Here is a basic configuration example.
21+
The Metrics Selector processor has two matching operations: prefix matching and substring matching.
22+
23+
### Prefix matching
24+
25+
Prefix matching compares the value of `metric_name` to the beginning of each incoming metric name. For example, `metric_name: fluentbit_input` results in a match for metrics named `fluentbit_input_records`, but not for metrics named `total_fluentbit_input`.
26+
27+
If no `operation_type` value is specified and the value of `metric_name` is a standard string, the Metrics Selector processor defaults to prefix matching.
28+
29+
### Substring matching
30+
31+
Substring matching treats the value of `metric_name` as a regex pattern, and compares this pattern against each incoming metric name accordingly. This pattern can appear anywhere within the name of the incoming metric. For example, `metric_name: bytes` results in a match for metrics named `bytes_total` and metrics named `input_bytes_count`.
32+
33+
If the value of `metric_name` is a string wrapped in forward slashes (for example, `metric_name: /storage..*/`), the Metrics Selector processor defaults to substring matching, regardless of whether an `operation_type` value is specified. This means that a `metric_name` value wrapped in forward slashes will always use substring matching, even if `operation_type` is set to `PREFIX`.
34+
35+
However, if `operation_type` is explicitly set to `SUBSTRING`, you don't need to wrap the value of `metric_name` in forward slashes.
36+
37+
## Configuration examples
38+
39+
The following examples show possible configurations of the Metrics Selector processor.
40+
41+
### Without `context`
2242

23-
{% tabs %}
24-
{% tab title="fluent-bit.yaml" %}
2543
```yaml
2644
service:
2745
flush: 5
@@ -51,9 +69,9 @@ pipeline:
5169
- name: stdout
5270
match: '*'
5371
```
54-
{% endtab %}
5572
56-
{% tab title="context-delete\_label\_value.yaml" %}
73+
### With `context`
74+
5775
```yaml
5876
service:
5977
flush: 5
@@ -80,14 +98,3 @@ pipeline:
8098
- name: stdout
8199
match: '*'
82100
```
83-
{% endtab %}
84-
{% endtabs %}
85-
86-
87-
All processors are only valid with the YAML configuration format.
88-
Processor configuration should be located under the relevant input or output plugin configuration.
89-
90-
Metric\_Name parameter will translate the strings which is quoted with backslashes `/.../` as Regular expressions.
91-
Without them, users need to specify Operation\_Type whether prefix matching or substring matching.
92-
The default operation is prefix matching.
93-
For example, `/chunks/` will be translated as a regular expression.

pipeline/processors/traces.md renamed to pipeline/processors/sampling.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Traces
1+
# Sampling
22

3-
The _Traces_ sampling processor is designed with a pluggable architecture, allowing easy extension to support multiple sampling strategies and backends. It provides you with the ability to apply head or tail sampling to incoming trace telemetry data.
3+
The _Sampling_ processor is designed with a pluggable architecture, allowing easy extension to support multiple trace sampling strategies and backends. It provides you with the ability to apply head or tail sampling to incoming trace telemetry data.
44

55
Available samplers:
66

@@ -21,9 +21,9 @@ Conditions:
2121

2222
The processor does not provide any extra configuration parameter, it can be used directly in your _processors_ Yaml directive.
2323

24-
## Traces types
24+
## Sampling types
2525

26-
Traces have both a name and a type with the following possible settings:
26+
Sampling has both a name and a type with the following possible settings:
2727

2828
| Key | Possible values |
2929
| :----- | :---------------------: |

0 commit comments

Comments
 (0)