Skip to content

Commit aaef47d

Browse files
authored
Fixing shell usage and code layout for OTel input plugin docs. Fixes #1845. (#1848)
Signed-off-by: Eric D. Schabell <[email protected]>
1 parent 1a77c13 commit aaef47d

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pipeline/inputs/opentelemetry.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ The OpenTelemetry input plugin supports the following telemetry data types:
6363
A sample configuration file to get started will look something like the following:
6464

6565
{% tabs %}
66-
6766
{% tab title="fluent-bit.yaml" %}
6867

6968
```yaml
@@ -72,13 +71,13 @@ pipeline:
7271
- name: opentelemetry
7372
listen: 127.0.0.1
7473
port: 4318
74+
7575
outputs:
7676
- name: stdout
7777
match: '*'
7878
```
7979
8080
{% endtab %}
81-
8281
{% tab title="fluent-bit.conf" %}
8382
8483
```python
@@ -93,13 +92,12 @@ pipeline:
9392
```
9493

9594
{% endtab %}
96-
9795
{% endtabs %}
9896

9997
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.
10098

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

103-
```bash
104-
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
105-
```
101+
```shell
102+
$ 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
103+
```

0 commit comments

Comments
 (0)