Fluent Bit
Learn how to set up Fluent Bit's OpenTelemetry output plugin to forward logs and traces data to Sentry.
Fluent Bit supports exporting OpenTelemetry (OTEL)-compliant data to send logs and traces to Sentry.
Before you begin, ensure you have:
- Fluent Bit installed and running
- A Sentry project you want to send data to
You'll need your Sentry OTLP endpoint and authentication header. These can be found in your Sentry Project Settings under Client Keys (DSN) > OpenTelemetry (OTLP).
___OTLP_LOGS_URL___
___OTLP_TRACES_URL___
x-sentry-auth: sentry sentry_key=___PUBLIC_KEY___
Add the OpenTelemetry output plugin to your Fluent Bit configuration to forward data to Sentry.
To forward logs to Sentry, add the following output configuration:
fluent-bit.yamlpipeline:
outputs:
- name: opentelemetry
match: "*"
host: ___ORG_INGEST_DOMAIN___
port: 443
logs_uri: /api/___PROJECT_ID___/integration/otlp/v1/logs
tls: on
tls.verify: on
header:
- x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
To forward traces to Sentry, add the following output configuration:
fluent-bit.yamlpipeline:
outputs:
- name: opentelemetry
match: "*"
host: ___ORG_INGEST_DOMAIN___
port: 443
traces_uri: /api/___PROJECT_ID___/integration/otlp/v1/traces
tls: on
tls.verify: on
header:
- x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
To send both logs and traces to Sentry, include both logs_uri and traces_uri in the output configuration:
fluent-bit.yamlpipeline:
outputs:
- name: opentelemetry
match: "*"
host: ___ORG_INGEST_DOMAIN___
port: 443
logs_uri: /api/___PROJECT_ID___/integration/otlp/v1/logs
traces_uri: /api/___PROJECT_ID___/integration/otlp/v1/traces
tls: on
tls.verify: on
header:
- x-sentry-auth sentry sentry_key=___PUBLIC_KEY___
Fluent Bit's OpenTelemetry output plugin supports additional options for fine-tuning your setup:
| Option | Description | Default |
|---|---|---|
batch_size | Maximum number of log records to flush at a time | 1000 |
compress | Payload compression (gzip or zstd) | none |
log_response_payload | Log the response payload for debugging | true |
logs_body_key | Key to use for the log body | none |
retry_limit | Retry limit for failed deliveries | 1 |
For a complete list of configuration options, see the Fluent Bit OpenTelemetry documentation.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").