elastic / elastic/elastic-agent
Heartbeat scheduler/job limits are scoped per stream receiver instead of per component.
- Dominant language
- Go
- Stars
- 276
- Forks
- 266
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 312
Description
### Summary
Elastic Agent groups enabled inputs of one input type/output into a component in process mode:
https://github.com/elastic/elastic-agent/blob/main/pkg/component/component.go#L630-L686
OTel translation creates one complete Beat receiver per stream unless the input spec uses `single_receiver: true`:
https://github.com/elastic/elastic-agent/blob/main/internal/pkg/otel/translate/otelconfig.go#L470-L505
The Synthetics input specs do not set `single_receiver`. Every Heartbeat receiver calls `beater.New` and creates an independent scheduler:
https://github.com/elastic/beats/blob/main/heartbeat/beater/heartbeat.go#L111-L139
Heartbeat's default job limits are browser `2` and API `4`, and `SYNTHETICS_LIMIT_*` overrides are read into each scheduler configuration:
https://github.com/elastic/beats/blob/main/heartbeat/config/config.go#L64-L92
Consequently, the limits are no longer component/private-location-wide. With many browser/API monitor streams, every receiver owns a separate semaphore. This changes the effective concurrency bound from one limit per grouped Heartbeat component to one limit per monitor receiver.
### Expected
Heartbeat scheduler and `SYNTHETICS_LIMIT_*` limits continue to bound aggregate monitor concurrency for the component/private location.
### Actual
Each stream receiver independently enforces the configured limit.
Contributor guide
Assessment
This issue has not been assessed yet.