You set up tail sampling with 4 Collector replicas, but traces are fragmented and error traces are missing. Why?
AdvancedScenarioTracing and OpenTelemetry
Answer
Situation read → Spans of one trace land on different replicas, so each makes a decision on partial data.
What I'd do →
- Add a first tier of Collectors with the
loadbalancingexporter,routing_key: traceID, resolving the second tier via a headless Service (k8sordnsresolver). - Run
tail_samplingonly on the second tier. - Size
decision_waitto cover your longest normal trace andnum_tracesto fit memory. - Monitor
otelcol_processor_tail_sampling_*metrics and dropped spans.
Why → Tail sampling needs the complete trace in one place before deciding.
Interview tip → Scaling the second tier reshuffles trace ownership briefly; mention that you accept a little fragmentation during scale events.
More on Tracing and OpenTelemetry
Your company has 30 microservices and no tracing. How do you roll out distributed tracing?IntermediateTraces stop at service B: you see spans from A, but B's spans start new traces. What is wrong?BeginnerTracing every request costs too much. How do you design sampling?IntermediateA checkout request takes 4 seconds. Walk through how you use a trace to find the cause.BeginnerYour OpenTelemetry Collector is getting OOMKilled under load. How do you stabilise it?IntermediateHow do you trace a request that goes through Kafka from a producer to three consumers?Intermediate