Skip to main content

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This topic explains how to send logs from Fluent Bit to LaunchDarkly’s observability dashboards. Fluent Bit is a lightweight and high-performance log processor and forwarder that is commonly used in containerized environments such as Kubernetes and Amazon ECS.By configuring Fluent Bit to forward logs to LaunchDarkly, you can centralize your application logs alongside your feature flag data for unified observability.

Prerequisites

To use the Fluent Bit integration, you need:
  • A LaunchDarkly project key for your target environment
  • Fluent Bit installed and running in your environment
  • Network access to LaunchDarkly’s OpenTelemetry endpointTo learn how to find and copy your LaunchDarkly project key, read Project keys.

Configure Fluent Bit

Fluent Bit uses the Forward protocol to send logs to LaunchDarkly’s OpenTelemetry collector endpoint.

Basic configuration

Add the following output configuration to your Fluent Bit configuration file:
    [OUTPUT]
        Name          forward
        Match         *
        Host          otel.observability.app.launchdarkly.com
        Port          24224
        Tag           launchdarkly.project_id=YOUR_PROJECT_KEY
Replace YOUR_PROJECT_KEY with your LaunchDarkly project key.

Configuration with TLSFor production environments, enable TLS for secure communication:

    [OUTPUT]
        Name          forward
        Match         *
        Host          otel.observability.app.launchdarkly.com
        Port          24224
        Tag           launchdarkly.project_id=YOUR_PROJECT_ID
        tls           on
        tls.verify    on

AWS ECS with AWS Fire

LensIf you’re running containers on Amazon ECS, you can use AWS FireLens to route logs through Fluent Bit to LaunchDarkly. FireLens is a container log router for Amazon ECS that gives you the ability to use Fluent Bit for log processing. Here’s an example ECS task definition snippet:
    {
      "containerDefinitions": [
        {
          "name": "your-app",
          "image": "your-app-image",
          "logConfiguration": {
            "logDriver": "awsfirelens",
            "options": {
              "Name": "forward",
              "Host": "otel.observability.app.launchdarkly.com",
              "Port": "24224",
              "Tag": "launchdarkly.project_id=YOUR_PROJECT_KEY"
            }
          }
        },
        {
          "name": "log_router",
          "image": "amazon/aws-for-fluent-bit:latest",
          "essential": true,
          "firelensConfiguration": {
            "type": "fluentbit"
          }
        }
      ]
    }
Here is an example using Terraform:
    resource "aws_ecs_task_definition" "app" {
      # ... other configuration ...

      container_definitions = jsonencode([
        {
          name  = "your-app"
          image = "your-app-image"
          logConfiguration = {
            logDriver = "awsfirelens"
            options = {
              Name = "Forward"
              Host = var.observability_logging.host
              Port = "24224"
              Tag  = "launchdarkly.project_id=${var.launchdarkly_project_id}"
            }
          }
        },
        {
          name      = "log_router"
          image     = "amazon/aws-for-fluent-bit:latest"
          essential = true
          firelensConfiguration = {
            type = "fluentbit"
          }
        }
      ])
    }

Kubernetes with Fluent Bit Daemon

SetFor Kubernetes environments, you can configure Fluent Bit as a DaemonSet to collect logs from all pods:
    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: fluent-bit-config
      namespace: logging
    data:
      fluent-bit.conf: |
        [SERVICE]
            Flush         1
            Log_Level     info
            Daemon        off
            Parsers_File  parsers.conf

        [INPUT]
            Name              tail
            Path              /var/log/containers/*.log
            Parser            docker
            Tag               kube.*
            Refresh_Interval  5
            Mem_Buf_Limit     5MB

        [OUTPUT]
            Name          forward
            Match         *
            Host          otel.observability.app.launchdarkly.com
            Port          24224
            Tag           launchdarkly.project_id=YOUR_PROJECT_KEY
            tls           on
            tls.verify    on

Configuration options

The following table describes the key configuration options for the Fluent Bit Forward output: | Option | Description
Required
| --- | --- | | Host | LaunchDarkly’s OpenTelemetry endpoint: otel.observability.app.launchdarkly.com | Yes | | Port | The port number: 24224 | Yes | | Tag | Must include launchdarkly.project_id=YOUR_PROJECT_KEY to route logs to your project | Yes | | tls | Enable TLS encryption. Set to on for production. | Recommended | | tls.verify | Verify TLS certificates. Set to on for production. | Recommended |

View logs in Launch

Darkly observability dashboardsAfter you configure Fluent Bit, logs begin flowing to LaunchDarkly within a few minutes. To view your logs:
  1. Navigate to Observability in LaunchDarkly.
  2. Select the environment associated with your project.
  3. Navigate to the Logs tab.
  4. Use the search and filter options to find specific log entries.
Your logs are automatically associated with your LaunchDarkly project, allowing you to correlate log data with feature flag evaluations and other observability metrics.

Troubleshooting

If logs are not appearing in LaunchDarkly:
  1. Verify network connectivity: Ensure your Fluent Bit instance can reach otel.observability.app.launchdarkly.com on port 24224.
  2. Check the project key: Verify that the launchdarkly.project_id in your tag matches your actual LaunchDarkly project key.
  3. Review Fluent Bit logs: Check Fluent Bit’s own logs for connection errors or warnings:
    # For standalone Fluent Bit
    fluent-bit -c /path/to/fluent-bit.conf -v

    # For Kubernetes DaemonSet
    kubectl logs -n logging -l app=fluent-bit
  1. Test connectivity: Use a tool like nc or telnet to verify port accessibility:
    nc -zv otel.observability.app.launchdarkly.com 24224