OpenTelemetry

An input plugin to ingest OTLP Logs, Metrics, and Traces

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.

Our compliant implementation fully supports OTLP/HTTP and OTLP/GRPC. Note that the single port configured which defaults to 4318 supports both transports.

Configuration

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.

OTLP Transport Protocol Endpoints

Fluent Bit based on the OTLP desired protocol exposes the following endpoints for data ingestion:

OTLP/HTTP

  • Logs

    • /v1/logs

  • Metrics

    • /v1/metrics

  • Traces

    • /v1/traces

OTLP/GRPC

  • Logs

    • /opentelemetry.proto.collector.log.v1.LogService/Export

    • /opentelemetry.proto.collector.log.v1.LogService/Export

  • Metrics

    • /opentelemetry.proto.collector.metric.v1.MetricService/Export

    • /opentelemetry.proto.collector.metrics.v1.MetricsService/Export

  • Traces

    • /opentelemetry.proto.collector.trace.v1.TraceService/Export

    • /opentelemetry.proto.collector.traces.v1.TracesService/Export

Getting started

The OpenTelemetry plugin currently supports the following telemetry data types:

A sample config file to get started will look something like the following:

pipeline:
    inputs:
        - name: opentelemetry
          listen: 127.0.0.1
          port: 4318
    outputs:
        - name: stdout
          match: '*'

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.

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

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

Last updated