How do you design a petabyte-scale telemetry pipeline that decouples generation from storage while aggressively curbing backend SaaS costs?
An architectural blueprint for unified observability pipelines, focusing on edge processing, intelligent tail-based sampling, and vendor-agnostic telemetry.
What the interviewer is scoring
- Whether they understand the architectural necessity of a decoupled telemetry pipeline.
- Does the candidate design robust mechanisms for data routing, transformation, and redaction at the edge?
- That they formulate a strategy for intelligent sampling to manage backend storage costs.
- Whether the candidate implements monitoring and alerting for the telemetry pipeline itself to ensure reliability.
Answer
Short answer
An architectural blueprint for unified observability pipelines, focusing on edge processing, intelligent tail-based sampling, and vendor-agnostic telemetry.
The cost of blind scaling
As distributed architectures expand, the volume of telemetry data outpaces revenue growth. Left unchecked, disparate engineering teams select fragmented observability tooling, dumping indiscriminate logs and un-sampled traces into expensive SaaS backends. This produces a sprawling, cost-prohibitive infrastructure where data is voluminous but devoid of correlation, driving mean time to resolution (MTTR) up rather than down. Telemetry must be managed as a critical, high-volume data pipeline.
Why direct-to-vendor telemetry breaks first
The naive approach couples application code directly to proprietary vendor agents and sinks. Services send data directly to the observability backend over the internet. When the backend experiences an outage, traces are lost, and local queues exhaust application memory. Furthermore, ingesting 100% of generated data guarantees astronomical bills, forcing finance teams to blindly demand global reductions in logging verbosity, effectively blinding the engineering organization during critical incidents.
Decoupling at the edge
A modern telemetry architecture mandates the complete decoupling of data generation from storage and vendor logic. The adoption of OpenTelemetry (OTel) standardizes data emission across all services. Applications no longer speak to vendors; they emit standard telemetry to local edge collectors (deployed as DaemonSets). These edge collectors act as the first line of defense, receiving data via gRPC, enriching it with invariable infrastructure metadata, and forwarding it to a centralized, horizontally scalable gateway cluster over a durable queue.
flowchart TD
A["Application Pod (OTel SDK)"] -->|gRPC/HTTP| B["Edge Collector (DaemonSet)"]
B -->|Enriched Data| C["Gateway Collector Cluster"]
C -->|Transformation & Redaction| D{"Data Router"}
D -->|Logs| E["Log Storage Backend"]
D -->|Metrics| F["Time-Series Database"]
D -->|Traces| G["Distributed Tracing Backend"]
C -.->|Pipeline Metrics| FIntelligent sampling and cost control
The centralized gateway collectors form the routing and transformation brain of the pipeline. Here, data is mutated, PII is aggressively redacted, and unstructured logs are parsed into JSON before leaving the corporate boundary. More importantly, this tier executes intelligent sampling. Relying on random, head-based trace sampling at the edge destroys the integrity of the data. Instead, the gateway implements tail-based sampling, buffering complete traces in memory to evaluate their value. It retains 100% of traces containing errors, latency anomalies, or specific tenant IDs, while ruthlessly discarding routine, successful executions.
Pipeline reliability and autonomy
The telemetry pipeline is tier-zero infrastructure; if it fails, the organization flies blind. It requires the same rigor as user-facing production systems, necessitating internal monitoring, alerting on queue depths, and persistent buffering mechanisms (like Apache Kafka) to survive downstream outages. Finally, the architecture must support configuration as code, enabling autonomous service owners to define their own routing rules and sampling thresholds, democratizing observability without relying on a centralized bottleneck.
A robust observability strategy relies on decoupling data generation from storage; controlling the flow of telemetry through a unified pipeline is essential for maintaining visibility, ensuring compliance, and managing costs at scale.
© 2026 Preptima. Originally published at preptima.com.
Likely follow-ups
- How do you decide what to sample at the edge collector versus the gateway when the two tiers disagree on a trace's importance?
- What happens to this pipeline when a single misbehaving service starts emitting fifty times its normal log volume?
- How do you verify that tail-based sampling isn't silently discarding traces that matter to a specific customer?
Related questions
- Engineers added a user_id label to a few metrics and the observability bill went up tenfold. Explain what actually happened, and how you would fix it without losing the ability to debug.hardAlso on observability5 min
- A document was updated an hour ago and the assistant is still quoting the old version. Walk me through the diagnosis.hardAlso on observability6 min
- A regulator says this customer's data may not leave the country. How do you design for that?hardAlso on telemetry7 min
- How do you handle personal data in prompts, logs and traces for an LLM feature?mediumAlso on observability5 min