---
title: "Fluent Bit"
description: "Learn how to set up Fluent Bit's OpenTelemetry output plugin to forward logs and traces data to Sentry."
url: https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit/
---

# Fluent Bit Setup

[Fluent Bit](https://fluentbit.io/) supports [exporting OpenTelemetry (OTEL)-compliant](https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry) data to send logs and traces to Sentry.

## [Prerequisites](https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit.md#prerequisites)

Before you begin, ensure you have:

* Fluent Bit installed and running
* A Sentry project you want to send data to

## [Step 1: Get Your Sentry OTLP Credentials](https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit.md#step-1-get-your-sentry-otlp-credentials)

Find these in [Sentry Project Settings](https://sentry.io/settings/projects/) under **Client Keys (DSN)** > **OpenTelemetry (OTLP)**.

```bash
# Logs endpoint
___OTLP_LOGS_URL___

# Traces endpoint
___OTLP_TRACES_URL___

# Auth header (include in all requests)
x-sentry-auth: sentry sentry_key=___PUBLIC_KEY___
```

## [Step 2: Configure Fluent Bit](https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit.md#step-2-configure-fluent-bit)

Add the OpenTelemetry output plugin to your Fluent Bit configuration to forward data to Sentry.

### [Logs Only](https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit.md#logs-only)

Use `logs_uri` to forward only logs to Sentry.

`fluent-bit.yaml`

```yaml
pipeline:
  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___
```

### [Traces Only](https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit.md#traces-only)

Use `traces_uri` to forward only traces to Sentry.

`fluent-bit.yaml`

```yaml
pipeline:
  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___
```

### [Logs and Traces](https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit.md#logs-and-traces)

Include both `logs_uri` and `traces_uri` to forward logs and traces to Sentry.

`fluent-bit.yaml`

```yaml
pipeline:
  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___
```

## [Optional Configuration](https://docs.sentry.io/concepts/otlp/forwarding/pipelines/fluentbit.md#optional-configuration)

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](https://docs.fluentbit.io/manual/pipeline/outputs/opentelemetry).
