sampling
Recording only some traces to save cost, chosen by a rule such as a percentage or by keeping every error and slow request.
In more detail
Traces grow with traffic, so high-volume services sample them while keeping metrics complete. Head sampling decides at the start of a request; tail sampling decides after seeing the outcome, so it can keep every error and slow trace, the evidence most needed during an incident.
Example
The last field of traceparent carries the sampled flag.Related terms
- trace — A record of one request’s whole journey through a system, made of nested spans that show where the time went.
- tail latency — The latency of the slowest requests, measured by high percentiles such as p99.
- percentile — The value below which a given percentage of measurements fall; p99 latency is the time 99 in 100 requests beat.
- telemetry — The data a running system sends out about itself, such as logs, metrics and traces.
- traceparent — The HTTP header defined by Trace Context that carries the trace identifier, parent span identifier and sampling flag between services.
- distributed tracing — Following one request across every service, queue and database it touches by recording linked spans that share a trace identifier.
- cardinality — The number of distinct values a metric label can take, which multiplies how many separate series a metric creates.
- downsampling — Replacing detailed old data with coarser summaries, such as one value per hour instead of per ten seconds.
Taught in
- Observability: Logs, Metrics, Traces — Modern API Architecture: REST, GraphQL & gRPC
- Service Level Indicators — DevOps & Site Reliability Engineering
- Percentiles Rather Than Averages — DevOps & Site Reliability Engineering
- Distributed Tracing: OpenTelemetry & Traceparent — Production Full-Stack Engineering
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Metric Types: Counters And Gauges — Full-Stack Observability: Metrics, Tracing & Logging
- OpenTelemetry: The Vendor Neutral Path — Full-Stack Observability: Metrics, Tracing & Logging
- Fifteen Traces For Six Bookings: Where Context Was Lost — OpenTelemetry Certified Associate (OTCA) Exam Prep
- A Library That Traces Nothing, Safely: API, SDK And Extension — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Three Hundred Milliseconds In One Place: Tracing In Code — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Keep Your Logger: The Logs Bridge And Log Records — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Fifty Five Characters: Trace Context And Baggage — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Six Out Of Twelve At One In Four: Samplers — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Six Launches, No Code Changes: Language Agents — OpenTelemetry Certified Associate (OTCA) Exam Prep
- API And SDK Sprint: Fourteen Predictions — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Sixty Two New Names: Collector Components And Pipelines — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Which Node Was It? Collector Deployment Patterns — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Two Replicas, Half A Trace: Scaling The Collector — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Collector Sprint: Sixteen Predictions — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Maintenance Sprint: Symptoms First — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Forty Four Of Sixty: The Mock And What It Tells You — OpenTelemetry Certified Associate (OTCA) Exam Prep
- The Evening Before: Final Review — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Worked Design Three: Scaling The Metrics Pipeline — Scalable System Design & Distributed Architecture