pyroscope.ebpf collect interval under 15s issue
Describe the bug
When setting pyroscope.ebpf component collect_interval under 15s on alloy Pyroscope doesn't show similar interval on UI, I am not sure if it is the expected behavior.
here is with 30s collect_interval
and here is with 5s collect_interval
To Reproduce
1.Set pyroscope.ebpf collect_interval to a value under 5s 2.Check pyroscope UI intervals
Expected behavior
I expect to see profiles on the UI correlated to the collect_interval
Environment
- Infrastructure: docker containers
- Deployment tool: docker-compose
Additional Context
We currently hardcode 15s as the lowest step interval, that's why you values 15s seconds apart, maybe you can make this configurable?
https://github.com/grafana/pyroscope/blob/38a40a93f921d7e66b0ef346d59e5d9dc28632bf/pkg/querier/timeline/calculator.go#L11
That sounds doable, should it be configurable through the Querier config ?
Yes, I've implemented it as a configurable option in the Querier config!
The changes add a --querier.min-step-duration flag (defaults to 15s for backward compatibility) that allows users to configure the minimum
step duration.
Key changes:
- Added
MinStepDurationfield to querier Config - Created
CalcPointIntervalWithMinInterval()function that accepts custom minimum intervals - Updated all HTTP handlers to use the configurable value
- Added tests covering eBPF use cases (1s, 5s intervals)
Users can now run: --querier.min-step-duration=5s for fast eBPF profiling intervals.