Skip to main content
If your organization already uses an OpenTelemetry Collector, or wants to send AI tool telemetry to multiple backends at once, you can route data through a collector and fan it out to Weave alongside your own observability stack. This works with any AI tool that exports OTLP telemetry (Claude Code, Cline, Hermes & OpenClaw, etc.). Gemini CLI is an exception for a standard OTLP/HTTP receiver: it uses one exact endpoint for logs and metrics. Do not replace its generated endpoint with the collector base URL until both signals have a verified demultiplexing path; see Gemini CLI.

How it works

Instead of pointing each AI tool directly at Weave’s ingest endpoint, you point them at a local or shared OpenTelemetry Collector. The collector receives the telemetry and exports it to multiple destinations: Weave, Datadog, Grafana, a local file, or anything else with an OTLP-compatible receiver.

Setup

1

Create a telemetry API key in Weave

Go to Data → Claude Code → Connect, answer How do you pay for Claude Code?, click Set up telemetry, and create a new API key. For Cline, go to Data → Cline → Connect and click Create API key. Save the key. You’ll need it for the collector config.
2

Create a collector config file

Create a file called otel-collector-config.yaml:
Replace YOUR_WEAVE_API_KEY with the API key from step 1. To send to additional destinations, uncomment and configure extra exporters, then add them to the relevant pipelines.The standard batch processor groups telemetry by batch size and timeout; it does not cap the number of distinct weave.token resource attributes or the encoded request size. Weave accepts mixed-token batches above 32 keys, with limits of 6 MiB per decompressed request and 4,096 resource groups. Keep exports under both limits and configure a durable sending queue for retryable failures. A 413 response means the request must be split or reduced before retrying.
3

Run the collector

Run the official OpenTelemetry Collector Docker image:
4

Point your AI tools at the collector

Configure each tool to send telemetry to http://localhost:4318 instead of directly to Weave. Tools that take an exact OTLP logs URL, such as Hermes, use http://localhost:4318/v1/logs.Claude Code - update managed-settings.json:
Cline - set environment variables:
Claude Code and Cursor collector mode send the OTLP payload without the Weave auth header; configure x-weave-token on the collector’s Weave exporter. Keep the weave.token resource attribute through redaction so Weave can route the records. Cline can’t set resource attributes, so it sends its token to your collector as an x-weave-token header; configure the collector’s Weave exporter to forward the matching token.
5

Verify connection

Run an AI tool session and check that activity appears in Weave. The plugin install ping proves that the configured collector accepted a request; it does not prove that a custom processor or exporter forwarded it. If data isn’t flowing, add the debug exporter and inspect the collector’s exporter status before debugging the plugin.

Example: fan out to multiple backends

To send telemetry to both Weave and another platform, add exporters and list them in the pipeline:

Running in production

For shared or long-running environments, consider:
  • Docker Compose - add the collector as a service alongside your existing stack
  • Kubernetes - deploy as a DaemonSet or sidecar using the OpenTelemetry Collector Helm chart
  • Secrets management - store API keys in environment variables or a secrets manager rather than in the config file:

Cost tracking

A collector only forwards what each tool emits, so cost tracking is unchanged by routing through it. If a tool’s telemetry includes a cost or token signal (for example, Claude Code’s cost_usd or Gemini CLI token usage), that estimated cost flows to Weave through the collector exactly as it would on a direct connection. For actual billed cost, you still connect the provider’s admin/analytics API key on the tool’s Data page — that path is separate from OTLP telemetry and doesn’t go through the collector. See AI tool costs for which tools report real vs estimated cost.

Troubleshooting

  1. Add the debug exporter to your pipeline to confirm the collector is receiving data
  2. Check that the Weave API key is valid
  3. Verify the collector can reach https://app.workweave.ai (no firewall or proxy blocking)
  4. Ensure the AI tool is pointed at the correct collector port (default 4318 for HTTP)
  1. Verify the exporter name is listed in the pipeline’s exporters array
  2. Check credentials for each destination
  3. Review collector logs for export errors (docker logs otel-collector)
  1. Validate your YAML syntax
  2. Check that port 4318 isn’t already in use
  3. Ensure the config file is mounted correctly in Docker
  4. Run with debug verbosity for detailed startup logs
Last modified on October 17, 2026