refining – Amazon Santana https://amazonsantana.com Wed, 02 Dec 2026 21:29:52 +0000 en-US hourly 1 https://wordpress.org/?v=7.1.5 https://amazonsantana.com/wp-content/uploads/2025/04/cropped-Gemini_Generated_Image_ddh89kddh89kddh8-32x32.webp refining – Amazon Santana https://amazonsantana.com 32 32 Refining Observability at Scale: How STCLab SREs Solved Data Inaccuracy and eBPF Performance Hurdles https://amazonsantana.com/refining-observability-at-scale-how-stclab-sres-solved-data-inaccuracy-and-ebpf-performance-hurdles/ https://amazonsantana.com/refining-observability-at-scale-how-stclab-sres-solved-data-inaccuracy-and-ebpf-performance-hurdles/#respond Wed, 02 Dec 2026 21:29:52 +0000 https://amazonsantana.com/refining-observability-at-scale-how-stclab-sres-solved-data-inaccuracy-and-ebpf-performance-hurdles/ The reliability of modern cloud-native observability platforms rests on the integrity of the data they ingest. For the SRE team at STCLab, the transition from simple metric collection to automated, AI-driven diagnostics necessitated a total recalibration of their observability stack. As the team moved toward using HolmesGPT to autonomously investigate infrastructure alerts, they discovered that the foundation of their system—the metrics generated by OpenTelemetry (OTel)—was suffering from critical inaccuracies. This realization triggered a year-long engineering effort to standardize telemetry data, manage cardinality, and implement eBPF-based instrumentation without sacrificing system performance.

A Chronology of the Observability Evolution

The STCLab SRE team’s journey began in December 2025, when they first documented the construction of a robust observability platform utilizing the LGTM stack (Loki for logs, Grafana for visualization, Tempo for tracing, and Mimir for metrics). By April 2026, the team advanced this architecture by integrating HolmesGPT, an AI-powered agent designed to perform root-cause analysis by cross-referencing metrics, logs, and traces.

However, the integration of an autonomous investigator highlighted a dangerous reality: if the telemetry data is flawed, the AI’s conclusions will be equally compromised. By mid-2026, the team identified two primary failure points: a significant divergence between reported request counts and actual traffic, and a total lack of telemetry for specific high-performance workloads. Addressing these gaps became the primary objective for the latter half of 2026.

The Challenge of Inaccurate Telemetry and Multi-Writer Conflicts

The core of the data inaccuracy issue stemmed from the gateway Collectors. The team utilized a Kubernetes Service that scaled dynamically between 3 and 20 replicas. Each replica was configured to perform tail sampling and generate span and service graph metrics. Because multiple replicas were writing to the same cumulative counter series in Prometheus without unique identifiers, the system suffered from interleaved data. Prometheus-style rate() functions interpreted these overlapping writes as constant resets, leading to wildly inflated request counts. In one instance, the service graph reported 6,801 requests per second for an API that the application SDK reported at only 26.2.

Lessons from production: Scaling OpenTelemetry and measuring eBPF overhead

To resolve this, the team re-engineered the gateway architecture into a two-stage pipeline within the same pods. In Stage 1, incoming spans are enriched with Kubernetes metadata. A load-balancing exporter then routes these spans based on the trace ID to a headless service, ensuring each trace is handled consistently. Stage 2 splits the pipeline: one branch generates the service graph before sampling occurs, while the other performs tail sampling and exports to Tempo. By assigning a stable writer label derived from the StatefulSet pod name to every metric, the team successfully eliminated the multi-writer conflict, aligning span metric rates with actual traffic within a 1% margin of error.

Furthermore, the team audited the cardinality of their metrics. They discovered that including full object-storage URLs as a dimension in their span metrics created 58,844 distinct series for a single service—accounting for 20% of their total production cardinality. By abstracting these URLs into standardized routes, they reduced the series count by 35% in a single day, significantly improving the performance of their Mimir backend.

eBPF Instrumentation: Measuring the Cost of Visibility

With data accuracy stabilized, the team turned their attention to instrumenting their traffic-control core, which runs as a compiled C daemon. Traditional instrumentation required significant development effort and frequent code changes. The team opted to explore eBPF (Extended Berkeley Packet Filter) to gain granular insights without modifying the application source code. However, they recognized that kernel-level probes impose a performance tax on the CPU, necessitating a rigorous benchmarking phase before deployment.

The team evaluated three distinct eBPF layers:

  1. Network Layer (Cilium Hubble): This was selected for its ability to track L3/L4 flows, drops, and resets across the cluster. It provides a baseline of connectivity without the overhead of application-level parsing.
  2. Request Layer (OpenTelemetry eBPF Instrumentation – OBI): OBI translates raw HTTP traffic into spans. Testing revealed that at 2,400 requests per second, the daemon’s CPU usage increased by 25% (from 41.6 to 51.8 µs per request). The team discovered that approximately 66% of this overhead was caused by header tracking required for W3C traceparent headers.
  3. Deep Inspection (Inspektor Gadget): Used primarily for on-demand debugging, this toolset provides deep kernel visibility. While the TCP tracer added an 11% overhead, the team concluded that for production use, the cost was justified only during incident response scenarios.

The team’s empirical findings illustrate the trade-offs inherent in observability. For their high-traffic core instances, a 25% CPU overhead was deemed unacceptable. Consequently, they adopted a tiered strategy: Hubble remains active cluster-wide, while OBI is applied selectively to lower-traffic workloads. During critical incidents, HolmesGPT is permitted to trigger the Inspektor Gadget TCP tracer for 60-second bursts to capture diagnostic data.

Lessons from production: Scaling OpenTelemetry and measuring eBPF overhead

Broader Implications for Cloud-Native SRE

The STCLab case study serves as a bellwether for the future of AI-augmented operations. The shift from human-in-the-loop diagnostics to automated agents like HolmesGPT requires a higher standard of data hygiene than was previously necessary for simple dashboards.

The implications of this transition are threefold:

  • Telemetry Integrity as a Safety Feature: When automation makes decisions, "approximate" data is no longer sufficient. Organizations must invest in architectural patterns—such as the two-stage gateway implemented by STCLab—to ensure that metrics are consistent across distributed collectors.
  • Performance Benchmarking as a Prerequisite: The use of eBPF and advanced instrumentation tools can lead to "observability-induced degradation." SRE teams must adopt a rigorous "measure-before-deploy" policy, utilizing cgroup counters to ensure that monitoring tools do not inadvertently trigger the very liveness timeouts they are designed to detect.
  • Tooling Lifecycle Management: The team’s decision to implement strict parameter validation and automated cleanup for debug pods after Inspektor Gadget runs highlights the importance of operational security. Modern observability platforms are becoming increasingly powerful; without proper guardrails, the tools used to fix a system can become a vector for instability or resource exhaustion.

By standardizing their data pipelines and establishing clear performance thresholds for their instrumentation, the STCLab team has provided a blueprint for organizations struggling to bridge the gap between high-volume telemetry and actionable, AI-ready diagnostics. As the industry continues to move toward autonomous operations, the ability to maintain the "source of truth" in a distributed environment will remain the most critical skill for SRE teams worldwide. This transition necessitates not only a deep understanding of CNCF tools like Prometheus, OpenTelemetry, and Cilium, but also a disciplined approach to the performance costs associated with modern visibility.

]]>
https://amazonsantana.com/refining-observability-at-scale-how-stclab-sres-solved-data-inaccuracy-and-ebpf-performance-hurdles/feed/ 0