docs/enterprise-solutions/monitoring/opentelemetry.mdx
Cline includes opt-in OpenTelemetry support for exporting metrics and logs to your own observability infrastructure using the OpenTelemetry Protocol (OTLP).
<Note> OpenTelemetry integration is **optional** and intended for advanced users with existing observability infrastructure. Most users won't need this feature. </Note>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:
Cline supports OpenTelemetry's OTLP (OpenTelemetry Protocol) export with:
<CardGroup cols={2}> <Card title="Metrics Export" icon="chart-bar"> Export metrics about Cline usage, performance, and errors </Card> <Card title="Logs Export" icon="file-lines"> Export structured logs for debugging and analysis </Card> </CardGroup>Cline supports three OTLP export protocols:
OpenTelemetry is configured using Remote Configuration from the dashboard.
Enable OpenTelemetry, configure an OTLP endpoint and select a protocol:
<Frame> </Frame>If you're using gRPC, you can opt out of TLS.
Once the collector has been configured, you can enable logs and/or metrics collection. At least one of them needs to be enabled.
You only need to configure it further if you need an advanced configuration.
You can add custom protocols and endpoints for both, logs and metrics. You can also configure the metrics export interval, and the logs batch size, batch timeout and max queue size.
<Frame> </Frame>Custom headers for authentication:
Finally, if your collector needs authentication headers, you can add key value pairs in the headers section.
<Frame> </Frame>Export to Datadog using their OTLP endpoint:
<Frame> </Frame>Export to New Relic:
<Frame> </Frame>Export to Grafana Cloud:
<Frame> </Frame>To test your configuration, log in to your account, perform some actions in a task, wait for the export interval, and verify that the data has arrived at your collector.
If you aren’t getting any data in your collector, the easiest way to verify your integration is to enable the developer tools in your editor.
To do this, open the webview developer tools.
Once you’ve done so, if you perform some actions that trigger metrics and/or logs (such as doing a task with Cline), you will see error logs if any error occurs when sending the data to your collector.
If you don't see any logs, enable debug mode.
Verify endpoint is accessible:
curl -v https://your-otlp-endpoint:4317
Check if insecure mode is needed by opting out of TLS
Verify authentication headers: Double-check your API keys and authentication headers are correct
Enable debug logging to see detailed OpenTelemetry information:
TEL_DEBUG_DIAGNOSTICS=true code .
This will output detailed information about:
When OpenTelemetry is enabled, Cline exports:
Current OpenTelemetry support in Cline: