Introduction Missing trace spans make it impossible to debug end-to-end request flows. When some requests are not traced, developers cannot identify the root cause of latency issues or errors.
Symptoms - Jaeger/Zipkin showing incomplete traces - Some requests appear in trace view while others do not - Trace IDs not propagating between services - Spans missing for specific services or endpoints - Parent-child span relationship broken
Common Causes - Trace context not propagated in HTTP headers - Sampling rate too low (most requests not sampled) - Service not instrumented with tracing SDK - Async requests losing trace context - Span buffer full causing span drops
Step-by-Step Fix 1. **Verify trace context propagation': ```bash # Check if trace headers are being sent curl -v https://api.example.com/endpoint | grep -i "x-request-id\|x-b3-traceid\|traceparent" ```
- 1.**Increase sampling rate':
- 2.```yaml
- 3.# Istio telemetry
- 4.apiVersion: telemetry.istio.io/v1alpha1
- 5.kind: Telemetry
- 6.metadata:
- 7.name: mesh-default
- 8.namespace: istio-system
- 9.spec:
- 10.tracing:
- 11.- providers:
- 12.- name: jaeger
- 13.randomSamplingPercentage: 100 # For debugging
- 14.
`