OpenTelemetry integration is optional and intended for advanced users with existing observability infrastructure. Most users won’t need this feature.
What is OpenTelemetry?
OpenTelemetry is an industry-standard observability framework that provides a unified way to collect and export telemetry data (metrics, logs, and traces). Cline’s OpenTelemetry support allows you to:- Export telemetry to your own systems
- Integrate with observability platforms like Datadog, New Relic, Grafana Cloud, etc.
- Maintain full control over your monitoring data
- Use your organization’s existing monitoring infrastructure
Supported Features
Cline supports OpenTelemetry’s OTLP (OpenTelemetry Protocol) export with:Metrics Export
Export metrics about Cline usage, performance, and errors
Logs Export
Export structured logs for debugging and analysis
Export Formats
Cline supports three OTLP export protocols:- gRPC (default, recommended)
- HTTP/protobuf
- HTTP/JSON
Export Destinations
You can export to:- Console (for testing)
- OTLP endpoint (your own collector or observability platform)
Configuration
OpenTelemetry is configured using environment variables before launching Cline.Basic Setup
Enable OpenTelemetry and configure an OTLP endpoint:Environment Variables
| Variable | Description | Default |
|---|---|---|
OTEL_TELEMETRY_ENABLED | Enable OpenTelemetry (1 or true) | Disabled |
OTEL_METRICS_EXPORTER | Metrics exporter type (console, otlp, or both) | None |
OTEL_LOGS_EXPORTER | Logs exporter type (console, otlp, or both) | None |
OTEL_EXPORTER_OTLP_ENDPOINT | OTLP endpoint URL | None |
OTEL_EXPORTER_OTLP_PROTOCOL | Protocol (grpc, http/protobuf, http/json) | grpc |
OTEL_EXPORTER_OTLP_INSECURE | Allow insecure connections | false |
OTEL_EXPORTER_OTLP_HEADERS | Custom headers (comma-separated key=value pairs) | None |
Advanced Configuration
Separate endpoints for metrics and logs:Integration Examples
Datadog
Export to Datadog using their OTLP endpoint:New Relic
Export to New Relic:Grafana Cloud
Export to Grafana Cloud:Testing Configuration
Test your configuration with console output before sending to a real endpoint:Troubleshooting
No Data Being Exported
-
Verify OpenTelemetry is enabled:
Should output
1ortrue -
Check exporters are configured:
-
Test with console exporter first:
Connection Errors
-
Verify endpoint is accessible:
-
Check if insecure mode is needed:
- Verify authentication headers: Double-check your API keys and authentication headers are correct
Debug Mode
Enable debug logging to see detailed OpenTelemetry information:- Configuration being used
- Exporters being created
- Connection attempts
- Export successes/failures
What Gets Exported
When Opentelemetry is enabled, Cline exports:Metrics
- Feature usage counts
- Task execution metrics
- Error rates and types
- Performance measurements
Logs
- System events
- Error logs with context
- Operational information
Limitations
Current OpenTelemetry support in Cline:- ✅ OTLP metrics export (console, gRPC, HTTP)
- ✅ OTLP logs export (console, gRPC, HTTP)
- ✅ Basic configuration via environment variables
- ❌ Distributed tracing (not yet implemented)
- ❌ Custom instrumentation API (not yet exposed)
- ❌ Sampling configuration (uses defaults)
Best Practices
- Test First: Always test with console exporter before sending to production
- Secure Credentials: Never hardcode API keys; use secure environment variable management
- Monitor Costs: Be aware of data ingestion costs with your observability platform
- Start Simple: Begin with metrics only, add logs if needed
- Use Compression: OTLP supports compression; check if your endpoint requires it

