CNCF tutorial shows how to cut AI agent telemetry costs with OpenTelemetry Collector
A new CNCF tutorial demonstrates filtering and reducing Claude Code's verbose OpenTelemetry output using the OpenTelemetry Collector to cut storage costs while preserving actionable observability data.
Summary
The CNCF published a tutorial by Adnan Rahic of Bindplane by Dynatrace showing how to tame high-volume telemetry from AI coding agents. Using Claude Code as an example, the author notes that a single small task with all content flags enabled produced 181 telemetry records and 289 KB of JSON. The tutorial builds a dual-pipeline OpenTelemetry Collector configuration: one raw pipeline as a control group, and an optimized pipeline that drops redundant content like full file bodies, prompts, and diffs while keeping counters and short attributes that answer specific operational questions. Both pipelines feed into Grafana LGTM for side-by-side comparison of cardinality, bytes per minute, and record counts.
What the optimized pipeline targets
- Log reduction: Drops
tool_parameterscarrying full file contents, trimstool.outputevents that duplicate span data, and removes prompt/response bodies not referenced by dashboards or alerts - Trace filtering: Eliminates redundant
tool.outputspan events where the same content already exists in logs; a 40 KB file read becomes a 40 KB span event without filtering - Metrics cardinality control: Moves high-cardinality identity attributes (
session.id,user.id,user.email, account IDs) from metric data points to resources or drops them entirely; 25 sessions generated 300 time series for just 8 metrics with default instrumentation - Pipeline architecture: Single OTLP receiver fans out to parallel raw and optimized pipelines with identical batch processors, ensuring byte-identical input for honest comparison; both export to Grafana LGTM
- Six targeted questions preserved: Cost per model, token usage by type, tool failure rates, edit rejection rates, latency (TTFT), and error classification
Why it matters
As AI coding agents deploy across engineering teams, their default telemetry instrumentation—designed for single-session debugging—creates unsustainable observability costs at fleet scale. The tutorial provides a concrete, vendor-neutral pattern using CNCF-graduated OpenTelemetry to shift the burden from agent defaults to configurable pipeline logic, making agent observability economically viable for platform teams.
Original reference: www.cncf.io →