> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/cline/cline/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitoring and observability

> Track usage, costs, and performance across your organization using built-in telemetry and OpenTelemetry export.

Cline Enterprise includes two complementary monitoring capabilities: built-in opt-in telemetry for anonymous usage tracking, and OpenTelemetry (OTLP) export for organizations that need to integrate with their own observability infrastructure.

## Monitoring options

<CardGroup cols={2}>
  <Card title="Built-in telemetry" icon="chart-simple">
    Anonymous usage tracking built into Cline. Captures feature usage, task completion rates, and error occurrences. No additional infrastructure required.
  </Card>

  <Card title="OpenTelemetry export" icon="chart-line">
    Export metrics and logs to your own observability platforms via OTLP. Integrates with Datadog, Grafana, New Relic, Splunk, and any OTLP-compatible backend.
  </Card>
</CardGroup>

## Built-in telemetry

Cline includes opt-in telemetry to help understand usage patterns. All data is anonymous.

### What is collected

<AccordionGroup>
  <Accordion title="Feature usage" icon="cursor-click">
    * Tools executed (for example, `read_file`, `execute_command`)
    * Slash commands used
    * Workflows triggered
    * Settings changed
  </Accordion>

  <Accordion title="Task metrics" icon="list-check">
    * Task started and completed events
    * Mode switches (Plan / Act)
    * Checkpoint usage
    * Task duration
  </Accordion>

  <Accordion title="Error events" icon="triangle-exclamation">
    * API failures
    * Tool execution errors
    * System errors and frequencies
  </Accordion>
</AccordionGroup>

### What is never collected

Cline telemetry never includes:

* Code or file contents
* File paths or names
* Command arguments or parameters
* Conversation content
* API keys or credentials
* Personal information

### User controls

Individual users enable or disable telemetry in **Cline Settings → Cline Telemetry**. Changes take effect immediately.

### Enterprise default configuration

Administrators can set the default telemetry state via remote configuration:

```json theme={null}
{
  "telemetryEnabled": true
}
```

<Note>
  Even when the enterprise default is enabled, individual users can disable Cline telemetry in their local settings.
</Note>

## OpenTelemetry export

For organizations with existing observability infrastructure, Cline supports OpenTelemetry Protocol (OTLP) export of metrics and logs.

<Note>
  OpenTelemetry integration is optional. It requires additional configuration and is intended for organizations with existing observability tooling. Most users do not need this feature.
</Note>

### What is exported

| Data type   | Examples                                                                            |
| :---------- | :---------------------------------------------------------------------------------- |
| **Metrics** | Feature usage counts, task execution metrics, error rates, performance measurements |
| **Logs**    | System events, error logs with context, operational information                     |

<Warning>
  Exported data is already anonymous and does not include code content, file paths, or sensitive information. However, you are responsible for securing the data once it reaches your systems.
</Warning>

### Export protocols

Cline supports three OTLP export protocols:

| Protocol          | Notes                                            |
| :---------------- | :----------------------------------------------- |
| **gRPC**          | Default. Recommended for most deployments.       |
| **HTTP/protobuf** | Use when gRPC is blocked by a proxy or firewall. |
| **HTTP/JSON**     | Use for maximum compatibility.                   |

### What is not yet supported

* Distributed tracing
* Custom instrumentation API
* Sampling configuration (defaults are used)

### Configuring OpenTelemetry

OpenTelemetry is configured from the Cline dashboard at [app.cline.bot](https://app.cline.bot/dashboard/organization?tab=settings) under **Organization Settings**.

<Steps>
  <Step title="Enable OpenTelemetry">
    In the Organization Settings page, find the **OpenTelemetry** section and toggle it on.
  </Step>

  <Step title="Configure the OTLP endpoint and protocol">
    Enter your OTLP collector endpoint URL and select a protocol (gRPC, HTTP/protobuf, or HTTP/JSON).

    If you are using gRPC, you can opt out of TLS for internal collector endpoints.
  </Step>

  <Step title="Enable metrics and/or logs">
    Toggle on at least one of **Metrics** or **Logs**. Both can be enabled simultaneously.
  </Step>

  <Step title="Configure advanced options (optional)">
    Advanced settings allow you to:

    * Set separate endpoints for metrics and logs
    * Adjust the metrics export interval
    * Configure log batch size, batch timeout, and maximum queue size
  </Step>

  <Step title="Add authentication headers (if required)">
    If your OTLP collector requires authentication, add key-value pairs in the **Headers** section. This is how you pass API keys or bearer tokens to platforms like Datadog or New Relic.
  </Step>
</Steps>

### Integration examples

<Tabs>
  <Tab title="Datadog">
    Datadog accepts OTLP data through its agent or through the Datadog OTLP ingestion endpoint.

    **Endpoint:** `https://otlp.datadoghq.com:4317` (gRPC) or `https://otlp.datadoghq.com:443/api/v1/otlp` (HTTP)

    **Required header:**

    ```
    DD-API-KEY: <your-datadog-api-key>
    ```

    Set the protocol to **gRPC** and add the `DD-API-KEY` header in the Headers section of the Cline OpenTelemetry settings.
  </Tab>

  <Tab title="Grafana Cloud">
    Grafana Cloud exposes an OTLP endpoint for each stack.

    **Endpoint:** Available in your Grafana Cloud stack details under **OpenTelemetry**.

    **Required header:**

    ```
    Authorization: Bearer <grafana-cloud-token>
    ```

    Use **HTTP/protobuf** or **gRPC** protocol and add the Authorization header in the Cline OpenTelemetry settings.
  </Tab>

  <Tab title="New Relic">
    New Relic supports OTLP ingest natively.

    **Endpoint:** `https://otlp.nr-data.net:4317` (gRPC) or `https://otlp.nr-data.net:4318/v1/metrics` (HTTP)

    **Required header:**

    ```
    api-key: <your-new-relic-license-key>
    ```

    Set the protocol to **gRPC** and add the `api-key` header in the Cline OpenTelemetry settings.
  </Tab>

  <Tab title="Self-hosted collector">
    Point Cline at your OpenTelemetry Collector instance:

    **Endpoint:** `http://your-collector:4317` (gRPC) or `http://your-collector:4318` (HTTP)

    For internal collectors without TLS, opt out of TLS in the gRPC settings. No authentication headers are required if your collector is on a private network.

    Example collector configuration for forwarding to multiple backends:

    ```yaml theme={null}
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:4318

    exporters:
      datadog:
        api:
          key: ${DD_API_KEY}
      prometheusremotewrite:
        endpoint: http://prometheus:9090/api/v1/write

    service:
      pipelines:
        metrics:
          receivers: [otlp]
          exporters: [datadog, prometheusremotewrite]
        logs:
          receivers: [otlp]
          exporters: [datadog]
    ```
  </Tab>
</Tabs>

### Testing your configuration

After saving the configuration:

1. Sign in to Cline and perform a few actions in a task.
2. Wait for the configured export interval (default: 60 seconds for metrics).
3. Verify that data has arrived in your collector or observability platform.

**If no data arrives:**

Enable debug logging by launching VS Code from the terminal with:

```bash theme={null}
TEL_DEBUG_DIAGNOSTICS=true code .
```

This outputs detailed information about configuration, exporter initialization, connection attempts, and export results.

Alternatively, open the [VS Code webview developer tools](https://code.visualstudio.com/api/extension-guides/webview#inspecting-and-debugging-webviews) to see OTLP export errors in the console.

### Troubleshooting

<AccordionGroup>
  <Accordion title="Connection errors" icon="circle-exclamation">
    1. Verify the endpoint is reachable:

    ```bash theme={null}
    curl -v https://your-otlp-endpoint:4317
    ```

    2. If the endpoint does not use TLS, opt out of TLS in the gRPC settings.
    3. Verify that authentication headers (API keys, bearer tokens) are correct.
  </Accordion>

  <Accordion title="No data in observability platform" icon="magnifying-glass">
    * Confirm at least one of Metrics or Logs is enabled.
    * Check that the export interval has elapsed before expecting data.
    * Enable debug mode (`TEL_DEBUG_DIAGNOSTICS=true`) and look for export errors.
    * Verify your collector or platform is accepting data from the Cline client IP.
  </Accordion>

  <Accordion title="Authentication failures" icon="key">
    * Double-check that the header key name matches exactly what your platform expects (for example, `DD-API-KEY` vs `api-key`).
    * Verify the API key or token has not expired.
    * Confirm the key has write/ingest permissions in your observability platform.
  </Accordion>
</AccordionGroup>

## Best practices

1. **Start with metrics only.** Add logs once you have confirmed metrics are flowing correctly.
2. **Test before production.** Verify data reaches your collector before enabling for your full team.
3. **Monitor ingestion costs.** Be aware of data ingestion pricing in your observability platform, especially when enabling detailed log export.
4. **Secure your headers.** API keys in the Headers section are stored in your organization's remote configuration. Rotate them according to your key management policies.
