Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to sample scrape targets using Alloy #3906

Open
bryanhuhta opened this issue Feb 12, 2025 · 0 comments
Open

Add option to sample scrape targets using Alloy #3906

bryanhuhta opened this issue Feb 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@bryanhuhta
Copy link
Contributor

bryanhuhta commented Feb 12, 2025

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).

@bryanhuhta bryanhuhta added the enhancement New feature or request label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant