docs/enterprise-solutions/monitoring/opentelemetry_override.mdx
Environment variables provide an alternative way to configure OpenTelemetry, useful for self-hosted deployments, local development, CI/CD pipelines, or when you need to override organization settings.
| Variable | Description | Values |
|---|---|---|
CLINE_OTEL_TELEMETRY_ENABLED | Enable OpenTelemetry export | "true" or "false" |
CLINE_OTEL_METRICS_EXPORTER | Metrics exporters (comma-separated) | "console", "otlp" |
CLINE_OTEL_LOGS_EXPORTER | Logs exporters (comma-separated) | "console", "otlp" |
| Variable | Description | Values |
|---|---|---|
CLINE_OTEL_EXPORTER_OTLP_PROTOCOL | OTLP protocol | "grpc", "http/json", or "http/protobuf" |
CLINE_OTEL_EXPORTER_OTLP_ENDPOINT | OTLP collector endpoint (applies to both metrics and logs) | URL with optional port |
CLINE_OTEL_EXPORTER_OTLP_HEADERS | Authentication headers (comma-separated key=value pairs) | "key=value,key2=value2" |
CLINE_OTEL_EXPORTER_OTLP_INSECURE | Disable TLS for gRPC (local development only) | "true" |
For separate metrics and logs endpoints:
| Variable | Description |
|---|---|
CLINE_OTEL_EXPORTER_OTLP_METRICS_PROTOCOL | Metrics-specific protocol override |
CLINE_OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | Metrics-specific endpoint |
CLINE_OTEL_EXPORTER_OTLP_LOGS_PROTOCOL | Logs-specific protocol override |
CLINE_OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Logs-specific endpoint |
| Variable | Description | Default |
|---|---|---|
CLINE_OTEL_METRIC_EXPORT_INTERVAL | Milliseconds between metric exports | 60000 |
CLINE_OTEL_LOG_BATCH_SIZE | Maximum batch size for log records | 512 |
CLINE_OTEL_LOG_BATCH_TIMEOUT | Maximum time before exporting logs (ms) | 5000 |
CLINE_OTEL_LOG_MAX_QUEUE_SIZE | Maximum queue size for log records | 2048 |
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=otlp
export CLINE_OTEL_LOGS_EXPORTER=otlp
export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT=https://api.datadoghq.com:4317
export CLINE_OTEL_EXPORTER_OTLP_HEADERS="dd-api-key=YOUR_API_KEY"
code .
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=otlp
export CLINE_OTEL_LOGS_EXPORTER=otlp
export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net:4318
export CLINE_OTEL_EXPORTER_OTLP_HEADERS="api-key=YOUR_LICENSE_KEY"
code .
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=otlp
export CLINE_OTEL_LOGS_EXPORTER=otlp
export CLINE_OTEL_EXPORTER_OTLP_PROTOCOL=grpc
export CLINE_OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
export CLINE_OTEL_EXPORTER_OTLP_INSECURE=true
code .
export CLINE_OTEL_TELEMETRY_ENABLED=true
export CLINE_OTEL_METRICS_EXPORTER=console
export CLINE_OTEL_LOGS_EXPORTER=console
code .
Enable detailed OpenTelemetry diagnostic logging:
export TEL_DEBUG_DIAGNOSTICS=true
code .
This outputs:
Check the VS Code Developer Tools Console (Help > Toggle Developer Tools) for diagnostic output.
When multiple configuration methods are present, Cline uses this priority order:
Environment variable configuration will override dashboard settings.