Cloud Monitoring Software Cloud Ops

STCLab details OpenTelemetry scaling fixes and eBPF overhead tests

STCLab’s SRE team has described how it corrected misleading service metrics and evaluated the performance costs of eBPF-based request observability in production-oriented workloads. The account, posted December 2, 2026, by Grace Park, Ihyeok Song and Eunseo Park, focuses on changes to an OpenTelemetry (OTel) pipeline and a measured approach to deploying instrumentation.

The work builds on the team’s earlier observability platform, which uses a central LGTM backend: Loki, Grafana, Tempo and Mimir. The team also uses HolmesGPT to investigate alerts using metrics, logs and traces, making data accuracy particularly important: incorrect telemetry could affect both dashboards and automated investigations.

Correcting multi-writer and sampling errors

The gateway Collectors ran behind a Kubernetes Service and scaled from three to 20 replicas. Each replica received spans, performed tail sampling and generated span and service graph metrics. Because multiple replicas wrote cumulative counter series without a label identifying each writer, Prometheus-style rate calculations interpreted interleaved values as repeated counter resets. One service graph consequently reported 6,801 requests per second for an API, while the application SDK reported 26.2.

A separate issue affected span metrics. Since the team generated them after tail sampling, the resulting request, error and duration metrics described sampled traces rather than all served traffic. To address both issues, STCLab split processing into two stages within the same gateway pods. The first adds Kubernetes metadata and routes spans by trace ID through a load-balancing exporter to a headless Service, keeping each trace on one pod. The second sends spans into separate pipelines: one builds the service graph before sampling, while the other tail samples and exports traces to Tempo.

For span metrics, another load-balancing exporter groups by service and span name so metrics are also generated before sampling. The team added a stable writer label based on the StatefulSet pod name to multi-writer series and adjusted queries to sum across writers. After the change, span metric rates matched received spans within 1%.

The team also reduced excessive metric cardinality. A span-metric dimension containing complete object-storage URLs generated 58,844 series for one service—20% of all active production series. Retaining the route instead reduced the count to about 1,200. A day of cleanup lowered active series by 35%.

Measuring the cost and limits of eBPF

For a compiled C traffic-control daemon, the team wanted request telemetry without requiring code changes. It tested eBPF tools on a development copy using the production CPU limit, distinguishing always-on network visibility from HTTP tracing and incident-time diagnostics.

Cilium Hubble remains enabled across the cluster, including production, to record L3/L4 flows, drops and resets. In the team’s configuration it does not capture HTTP, where OpenTelemetry eBPF Instrumentation (OBI) provides request spans linked to callers’ traces. Under equal load at approximately 2,400 requests per second, alternating OBI off and on raised measured CPU time per request from 41.6 to 51.8 microseconds, a 25% increase. The team attributed about two-thirds of that cost to header tracking, which is needed to read the W3C traceparent header and is disabled by default.

Sampling did not remove the processing cost, because probes still run on each request even when fewer spans are exported. OBI also captures full query strings. Since this workload’s URLs can contain session tokens, the Collector strips them before storage.

A controlled pause test exposed another limitation. The team stopped the daemon with SIGSTOP, sent a request with a 10-second client timeout, then resumed the process 13 seconds later. The client timed out, but OBI and the access log recorded a 0.125-millisecond 200 response because both began timing when the socket was read, missing the wait in the kernel queue. Inspektor Gadget’s TCP tracer detected connections waiting as long as 12.6 seconds to be accepted, but only because the tracer was already running.

Production use is selective

Inspektor Gadget is available as a HolmesGPT toolset in development and staging; production currently uses only its TCP tracer. Under the team’s tests, the CPU profiler added a median 3% to daemon CPU time per request, and the TCP tracer added 11%. The profiler did not provide useful stack detail because the daemon lacked symbols and frame pointers: only two of 22 stacks in a 30-second sample included a function name, and none showed a caller. The team is therefore holding it out of production until the daemon is rebuilt with those features.

Before production use, the team also added cleanup for privileged debug pods, narrowed permissions and enforced parameter validation. Hubble stays on across production, while high-traffic core instances remain uninstrumented because of OBI’s measured overhead. OBI runs continuously on two lower-traffic workloads after a one-week staging gate, adding about 1% of their CPU limit in the workload cgroup. During incidents, HolmesGPT can run the TCP tracer for 60 seconds; engineers can enable broader OBI coverage for two hours through a time-limited pull request.

STCLab’s operational guidance is to label every writer of a shared counter series, calculate traffic metrics before tail sampling, and measure eBPF overhead in the application’s cgroup rather than relying on the monitoring agent’s CPU use. It also recommends testing what an observability tool fails to see before relying on it in production.