Skip to content

Commit 1af0b76

Browse files
authored
Merge pull request #1772 from fluent/lynettemiles/sc-136192/update-fluent-bit-docs-pipeline-inputs-open
2 parents 2d09f8d + a503993 commit 1af0b76

File tree

1 file changed

+33
-29
lines changed

1 file changed

+33
-29
lines changed

pipeline/inputs/opentelemetry.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
---
2-
description: An input plugin to ingest OTLP Logs, Metrics, and Traces
2+
description: An input plugin to ingest OpenTelemetry logs, metrics, and traces
33
---
44

55
# OpenTelemetry
66

7-
The OpenTelemetry input plugin allows you to receive data as per the OTLP specification, from various OpenTelemetry exporters, the OpenTelemetry Collector, or Fluent Bit's OpenTelemetry output plugin.
7+
The OpenTelemetry input plugin lets you receive data based on the OpenTelemetry specification from various OpenTelemetry exporters, the OpenTelemetry Collector, or the Fluent Bit OpenTelemetry output plugin.
88

9-
Our compliant implementation fully supports OTLP/HTTP and OTLP/GRPC. Note that the single `port` configured which defaults to 4318 supports both transports.
9+
Fluent Bit has a compliant implementation which fully supports `OTLP/HTTP` and `OTLP/GRPC`. The single `port` configured defaults to `4318` and supports both transport methods.
1010

11-
## Configuration <a href="#configuration" id="configuration"></a>
11+
## Configuration
1212

13-
| Key | Description | default |
14-
| ----------------- | -----------------------------------------------------------------------------------| ------- |
15-
| listen | The network address to listen. | 0.0.0.0 |
16-
| port | The port for Fluent Bit to listen for incoming connections. Note that as of Fluent Bit v3.0.2 this port is used for both transport OTLP/HTTP and OTLP/GRPC. | 4318 |
17-
| tag | Tag for all the data ingested by this plugin. Important: This will only be used if `tag_from_uri` is set to false. Otherwise, the tag will be created from URI. | |
18-
| tag_key | Specify the key name to overwrite a tag. If set, the tag will be overwritten by a value of the key | |
19-
| raw_traces | Route trace data as a log | `false` |
20-
| buffer_max_size | Specify the maximum buffer size in KB/MB/GB to the HTTP payload. | 4M |
21-
| buffer_chunk_size | Initial size and allocation strategy to store the payload (advanced users only) | 512K |
22-
|successful_response_code | It allows to set successful response code. `200`, `201` and `204` are supported.| 201 |
23-
| tag_from_uri | By default, tag will be created from uri. e.g. v1_metrics from /v1/metrics. This must be set to false if using `tag` | `true` |
24-
| threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
13+
| Key | Description | Default |
14+
| -------- | ------------| ------- |
15+
| `listen` | The network address to listen on. | `0.0.0.0` |
16+
| `port` | The port for Fluent Bit to listen for incoming connections. In Fluent Bit 3.0.2 or later, this port is used for both transport `OTLP/HTTP` and `OTLP/GRPC`. | `4318` |
17+
| `tag` | Tag for all data ingested by this plugin. This will only be used if `tag_from_uri` is set to `false`. Otherwise, the tag will be created from the URI. | _none_ |
18+
| `tag_key` | Specify the key name to overwrite a tag. If set, the tag will be overwritten by a value of the key. | _none_ |
19+
| `raw_traces` | Route trace data as a log. | `false` |
20+
| `buffer_max_size` | Specify the maximum buffer size in `KB`, `MB`, or `GB` to the HTTP payload. | `4M` |
21+
| `buffer_chunk_size` | Initial size and allocation strategy to store the payload (advanced users only)` | `512K` |
22+
| `successful_response_code` | Allows for setting a successful response code. Supported values: `200`, `201`, or `204`. | `201` |
23+
| `tag_from_uri` | By default, the tag will be created from the URI. For example, `v1_metrics` from `/v1/metrics`. This must be set to false if using `tag`. | `true` |
24+
| `threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
2525

26-
Important note: Raw traces means that any data forwarded to the traces endpoint (`/v1/traces`) will be packed and forwarded as a log message, and will NOT be processed by Fluent Bit. The traces endpoint by default expects a valid protobuf encoded payload, but you can set the `raw_traces` option in case you want to get trace telemetry data to any of Fluent Bit's supported outputs.
26+
Raw traces means that any data forwarded to the traces endpoint (`/v1/traces`) will be packed and forwarded as a log message, and won' be processed by Fluent Bit. The traces endpoint by default expects a valid `protobuf` encoded payload, but you can set the `raw_traces` option in case you want to get trace telemetry data to any of the Fluent Bit supported outputs.
2727

28-
### OTLP Transport Protocol Endpoints
28+
### OpenTelemetry transport protocol endpoints
2929

30-
Fluent Bit based on the OTLP desired protocol exposes the following endpoints for data ingestion:
30+
Fluent Bit exposes the following endpoints for data ingestion based on the OpenTelemetry protocol:
31+
32+
For `OTLP/HTTP`:
3133

32-
__OTLP/HTTP__
3334
- Logs
3435
- `/v1/logs`
3536
- Metrics
3637
- `/v1/metrics`
3738
- Traces
3839
- `/v1/traces`
3940

40-
__OTLP/GRPC__
41+
For `OTLP/GRPC`:
4142

4243
- Logs
4344
- `/opentelemetry.proto.collector.log.v1.LogService/Export`
@@ -49,8 +50,7 @@ __OTLP/GRPC__
4950
- `/opentelemetry.proto.collector.trace.v1.TraceService/Export`
5051
- `/opentelemetry.proto.collector.traces.v1.TracesService/Export`
5152

52-
53-
## Getting started
53+
## Get started
5454

5555
The OpenTelemetry input plugin supports the following telemetry data types:
5656

@@ -60,12 +60,12 @@ The OpenTelemetry input plugin supports the following telemetry data types:
6060
| Metrics | Unimplemented | Stable | Stable |
6161
| Traces | Unimplemented | Stable | Stable |
6262

63-
A sample config file to get started will look something like the following:
64-
63+
A sample configuration file to get started will look something like the following:
6564

6665
{% tabs %}
6766

6867
{% tab title="fluent-bit.yaml" %}
68+
6969
```yaml
7070
pipeline:
7171
inputs:
@@ -76,10 +76,12 @@ pipeline:
7676
- name: stdout
7777
match: '*'
7878
```
79+
7980
{% endtab %}
8081
8182
{% tab title="fluent-bit.conf" %}
82-
```
83+
84+
```python
8385
[INPUT]
8486
name opentelemetry
8587
listen 127.0.0.1
@@ -89,13 +91,15 @@ pipeline:
8991
name stdout
9092
match *
9193
```
94+
9295
{% endtab %}
9396

9497
{% endtabs %}
9598

96-
With the above configuration, Fluent Bit will listen on port `4318` for data. You can now send telemetry data to the endpoints `/v1/metrics`, `/v1/traces`, and `/v1/logs` for metrics, traces, and logs respectively.
99+
With this configuration, Fluent Bit listens on port `4318` for data. You can now send telemetry data to the endpoints `/v1/metrics` for metrics, `/v1/traces` for traces, and `/v1/logs` for logs.
97100

98-
A sample curl request to POST json encoded log data would be:
99-
```
101+
A sample curl request to POST JSON encoded log data would be:
102+
103+
```bash
100104
curl --header "Content-Type: application/json" --request POST --data '{"resourceLogs":[{"resource":{},"scopeLogs":[{"scope":{},"logRecords":[{"timeUnixNano":"1660296023390371588","body":{"stringValue":"{\"message\":\"dummy\"}"},"traceId":"","spanId":""}]}]}]}' http://0.0.0.0:4318/v1/logs
101105
```

0 commit comments

Comments
 (0)