Engineering Decisions · Senior · Question 14 of 14

Storing every trace costs too much, but during incidents you need the errors and slow requests above all. How do you sample?

Show the answer

Correct answer: Tail-based: decide after the request has finished

Explanation

Tail-based sampling sees how a request ended, so it can keep every error and slow trace and drop the routine ones. Head-based sampling fits cheap overall statistics, and it's simple to run, but a random 1% misses most rare failures. Logs alone fit one small service, and they lose the cross-service view that tracing exists to give.

Further reading

Problem with a question

Engineering Decisions · Senior · question 14

Test yourself

Take the Engineering Decisions · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz