Integrations
Observability
Open Telemetry

Open Telemetry

Overview

FeatBit's backend services, including the Api, Evaluation-Server, and Data Analytic Service, are instrumented with OpenTelemetry to publish observability metrics, traces, and logs, enabling you to gain insights into FeatBit's performance and behavior.

Configuration

Basic Configuration

To enable OpenTelemetry, the following environment variables need to be set for each service:

  • ENABLE_OPENTELEMETRY: Tells the app that OpenTelemetry is enabled. Set to true to enable OpenTelemetry.
  • OTEL_SERVICE_NAME: This is used to identify the service in the observability backends. Set to the name of the service. For example, featbit-api for the Api service, featbit-els for the Evaluation-Server service, and featbit-das for the Data Analytic service.
  • OTEL_EXPORTER_OTLP_ENDPOINT: Sets the grpc endpoint of the OpenTelemetry exporter. For example: http://otel-collector:4317.

Additional Configuration

FeatBit's Api and Evaluation-Server services are written in .NET/C#, are instrumented with using .NET Automatic Instrumentation (opens in a new tab). For a complete list of supported environment variables, refer to the documentation (opens in a new tab).

The Data Analytic service, written in Python, is instrumented using the Python Automatic Instrumentation (opens in a new tab). For a complete list of supported environment variables, refer to the documentation (opens in a new tab).

A Ready-To-Run Example

We have a ready-to-run example for you to try out OpenTelemetry. In this example, we use Seq (opens in a new tab) for logs, Jaeger (opens in a new tab) for traces, and Prometheus (opens in a new tab) for metrics.

Follow the steps below to run the example:

# Clone the repository
git clone https://github.com/featbit/featbit.git
cd featbit
 
# Build the test images
docker compose --project-directory .  -f ./docker/composes/docker-compose-dev.yml build
 
# Start OTEL collector, Seq, Jaeger, and Prometheus
docker compose --project-directory .  -f ./docker/composes/docker-compose-otel-collector-contrib.yml up -d
 
# Start FeatBit services
docker compose --project-directory .  -f ./docker/composes/docker-compose-otel.yml up -d

Use FeatBit as normal, create feature flags, evaluate flags, view flag insights, etc. Then