Repository navigation
Workers Observability: tail-based sampling that keeps failed requests #16883
quantizor
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Workers Logs and traces support only head-based sampling (
head_sampling_rate): the keep-or-drop decision happens before the request runs. At any rate below 1, a request that throws, returns a 5xx, or exceeds a CPU limit is dropped with the same probability as a healthy one, so a rare failure often leaves no log or trace to debug.Request: a tail-based option, decided after the invocation finishes. For example,
observability.logs.keep_on: ["exception", "5xx", "exceeded_cpu"](and the same for traces) would always retain those invocations and applyhead_sampling_rateonly to the rest. That keeps volume and cost low without losing the requests that matter.Today the workaround is a Tail Worker that filters outcomes and forwards failures to another store, which duplicates what Workers Logs already does.
All reactions