From 2aaac8b469c3766e7f164502c136f5dd90342990 Mon Sep 17 00:00:00 2001 From: "Eric D. Schabell" Date: Thu, 3 Jul 2025 10:59:10 +0200 Subject: [PATCH] Fixing shell usage and code layout for OTel input plugin docs. Fixes #1845. Signed-off-by: Eric D. Schabell --- pipeline/inputs/opentelemetry.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pipeline/inputs/opentelemetry.md b/pipeline/inputs/opentelemetry.md index 5c59c58de..1c43d4c42 100644 --- a/pipeline/inputs/opentelemetry.md +++ b/pipeline/inputs/opentelemetry.md @@ -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 @@ -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 @@ -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 +``` \ No newline at end of file