Only ~1% of traces show up, and the error trace you need is missing
IntermediateTroubleshootingTracing, OpenTelemetry and CloudWatch
Answer
Likely causes → Head sampling (OTEL_TRACES_SAMPLER=parentbased_traceidratio, OTEL_TRACES_SAMPLER_ARG=0.01) decides before the outcome is known.
Diagnose → Check sampler env vars and collector processors.
Fix → Use tail sampling in a collector tier: keep all errors and slow traces, sample the rest:
tail_sampling:
policies:
- { name: errors, type: status_code, status_code: { status_codes: [ERROR] } }
- { name: slow, type: latency, latency: { threshold_ms: 1000 } }
- { name: rest, type: probabilistic, probabilistic: { sampling_percentage: 5 } }
Route all spans of a trace to the same collector with the loadbalancing exporter (routing_key: traceID).
Prevent → Document sampling so engineers know what is kept.
More on Tracing, OpenTelemetry and CloudWatch
Traces show only the frontend span; downstream services start new tracesIntermediateTraces break at the API gateway / ingress controllerIntermediateNo traces at all arrive; the app logs `Failed to export spans. The request could not be executed. Full error message: Failed to connect to localhost/127.0.0.1:4317`BeginnerSDK error `Unimplemented` / `404 Not Found` when exporting to the collectorIntermediateOTel collector logs `Exporting failed. Will retry the request after interval. {"kind": "exporter", "data_type": "traces", "name": "otlp", "error": "rpc error: code = Unavailable desc = connection error"}`IntermediateCollector logs `Dropping data because sending_queue is full`Advanced