You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Event Deltas: Deterministic sampling with adaptive sample size #1827
Replace ORDER BY rand() LIMIT 1000 with deterministic cityHash64(SpanId) sampling and adaptive sample sizing based on total span count, with a visible sample annotation in the legend.
Problem
Non-deterministic sampling: ORDER BY rand() means the same hover on the same bar highlights different heatmap cells after each query re-fetch, creating a confusing experience
Fixed sample size: 1,000 rows works for small datasets but under-represents rare attribute values at scale (100K+ spans). For tiny datasets (< 1,000), the sample IS the population but users can't tell
No transparency: Users see percentages like "2.3%" without knowing if that's 23/1000 sampled or 23/23 total
Changes
Deterministic sampling
STABLE_SAMPLE_EXPR = 'cityHash64(SpanId)' — used in ORDER BY clause for all sample queries (outlier, inlier, all-spans, and PartIds CTE). Same data always produces the same sample
Set to 'rand()' to restore non-deterministic behavior (tunable constant)
Activity
feat: deterministic sampling with adaptive sample size (#1849)
feat: deterministic sampling with adaptive sample size (#1849)