Add option to sample scrape targets using Alloy
- Dominant language
- Go
- Stars
- 11.7k
- Forks
- 802
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 80
Description
#### Is your feature request related to a problem? Please describe.
There's no mechanism to dynamically sample Kubernetes targets. We provide some guidance on how to sample workloads in this documentation: https://grafana.com/docs/pyroscope/latest/configure-client/grafana-alloy/sampling/. However, this assumes the workload is stable and the scaling doesn't change often, since the `modulus` value has to be hardcoded.
For workloads that can autoscale, this approach results in an increase of ingested profiles linearly proportional to the autoscale amount. That means a 10x autoscale corresponds to a 10x increase in profiles ingested. This linear increase isn't always desirable.
#### Describe the solution you'd like
One solution is to provide a setting on the `pyroscope.scrape` and `pyroscope.ebpf` to limit the number of targets it forwards. This could be a percentage (e.g. 10%) or a flat rate (e.g. 50).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.