Open
Description
Describe the solution you'd like
The current rate_limiting algorithm enforces a strict spans per second limit which has a couple of flaws:
- Traces with more spans than the span/sec limit cannot be sampled, they are always dropped
- Variations in the arrival rate of spans cannot be used to "burst" and temporarily consume previously unused capacity. This is desirable when the exact spans/sec rate is not required and the capacity can be spread over minutes or hours.
Describe alternatives you've considered
A token bucket or leaky bucket implementation would be useful