Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions pipeline/inputs/opentelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ The OpenTelemetry input plugin supports the following telemetry data types:
A sample configuration file to get started will look something like the following:

{% tabs %}

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

```yaml
Expand All @@ -72,13 +71,13 @@ pipeline:
- name: opentelemetry
listen: 127.0.0.1
port: 4318

outputs:
- name: stdout
match: '*'
```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```python
Expand All @@ -93,13 +92,12 @@ pipeline:
```

{% endtab %}

{% endtabs %}

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.

A sample curl request to POST JSON encoded log data would be:

```bash
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
```
```shell
$ 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
```