we need a ratio-based sampler that works in conjunction with the rate limit sampler.
we should build it in a way that supports adding any number of samplers with a way to ensure they are prioritized consistently.
we should also figure out a way to use the per-task sampler config to control the ratio sampler. meaning, we should be able to rate-limit and ratio-sample both shared/globally AND for each task name following the pattern introduced in go-vela/server#1184
{
"/metrics": {
"active": true,
+ "ratio": 0.2, <- record 20% of total traces for this task
+ "persecond": 5 <- record 5 traces per second for this task
}
}
Description
we need a ratio-based sampler that works in conjunction with the rate limit sampler.
we should build it in a way that supports adding any number of samplers with a way to ensure they are prioritized consistently.
we should also figure out a way to use the per-task sampler config to control the ratio sampler. meaning, we should be able to rate-limit and ratio-sample both shared/globally AND for each task name following the pattern introduced in go-vela/server#1184