Fluent Bit log drain
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 endpoint
To 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:
Replace YOUR_PROJECT_KEY with your LaunchDarkly project key.
Configuration with TLS
For production environments, enable TLS for secure communication:
AWS ECS with AWS FireLens
If 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:
Here is an example using Terraform:
Kubernetes with Fluent Bit DaemonSet
For Kubernetes environments, you can configure Fluent Bit as a DaemonSet to collect logs from all pods:
Configuration options
The following table describes the key configuration options for the Fluent Bit Forward output:
View logs in LaunchDarkly observability dashboards
After you configure Fluent Bit, logs begin flowing to LaunchDarkly within a few minutes.
To view your logs:
- Navigate to Observability in LaunchDarkly.
- Select the environment associated with your project.
- Navigate to the Logs tab.
- 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:
-
Verify network connectivity: Ensure your Fluent Bit instance can reach
otel.observability.app.launchdarkly.comon port24224. -
Check the project key: Verify that the
launchdarkly.project_idin your tag matches your actual LaunchDarkly project key. -
Review Fluent Bit logs: Check Fluent Bit’s own logs for connection errors or warnings:
- Test connectivity: Use a tool like
ncortelnetto verify port accessibility: