Setting up OTEL can be tricky, if you have any questions, feel free to reach out to us on slack!
Overview
This guide walks you through setting up the OpenTelemetry Collector in your Kubernetes environment and configuring it to send telemetry data to Statsig using the officialotlphttp
exporter
✅ Prerequisites
- A running Kubernetes cluster (e.g., GKE, EKS, Minikube, etc.)
- Helm installed, or another mechanism to apply helm charts to your cluster, like ArgoCD
- API Access to a Statsig project with a Server SDK Secret Key
- Optional:
kubectl
configured and connected to the cluster, for validating and debugging setup
1. Setup OpenTelemetry Collector on Kubernetes
Our recommend setup follows the official OpenTelemetry Kubernetes guide to install the OpenTelemetry Collector in both DaemonSet and Deployment modes, using the official Helm Chart. Note: You’ll find well-tested and ready-to-usevalues.yaml
files for both deployments modes in Step 3!
📘 Official Guide:
OpenTelemetry Collector for Kubernetes – Getting Started
Why both?
- DaemonSet Collector: Runs one instance per node to collect host-level telemetry (e.g., logs, pod and node metrics).
- Deployment Collector: Runs one instance per cluster to gather telemetry related to the cluster as a whole.
- Minimum for scraping logs:
- Minimum for scraping kubernetes metrics
- Minimum for metrics about Otel Collector itself
- OTLP Receiver for scraping internal metrics (alternatively scraped through prometheus receiver)
2. Configure exporting telemetry to Statsig with OTLP HTTP Exporter
Statsig supports receiving OTLP formatted, JSON encoded telemetry at the endpointhttps://api.statsig.com/otlp
. The OpenTelemetry Collector supports sending the scraped telemetry to the Statsig endpoint via the official otlphttp
exporter.
Authentication
Requests are authenticated using request headerstatsig-api-key
and a valid SDK Server Secret key generated from console.statsig.com (under Settings > Keys & Environments). It is recommended to keep your secret key secure with a Kubernetes Secret management provider and make it available to access securely from the open telemetry collector pod’s environment.
Example Exporter Config
3. Example Helm Chart Values for a quick and correct setup
We provide two complete and testedvalues.yaml
configurations for use with the OpenTelemetry Helm charts:
🔗 Deployment Collector
👉 values-gateway.yaml🔗 DaemonSet Collector
👉 values-agent.yaml Use them with the Helm chart version0.75.1
like this: