-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Follow on from #17838
Update metrics exposed by pipelines to expose the statistic view of batch structure.
This is helpful to understand if a batch is fulfilled or if the total size of events it contains is too big.
Phase 2 adds the functionality to expose percentiles, and values in time windows of 1, 5, 15 minutes.
To collect such kind of information an histogram metric should be used. The histograms used should be contained or referenced by the pipeline and the writer must write in thread safe way, in case of HdrHistogram
using the ´Recorder` class. On the read side, which is expected to be done by the metrics collector in a single thread, the sum up of partial histograms into global ones, should be thread safe as experimented in the https://gist.github.com/andsel/b56ba80e9bef1aaa95cf435f2366109b.
This feature should be implemented behind a feature flag, so that in contexts where it proves to be a bottleneck we give an escape path to our customer. However, from the analysis done, the computation of the size shouldn’t impact performance too much.
The feature flag can be global, usually set in logstash.yml
or per pipeline in pipelines.yml
. The value of the flag at pipeline level has precedence over the one globally specified.
The feature flag is not just a boolean but can be none
(to disable the collection of such metrics), minimal
to collect only 1% of the total batches or full
to collect data from every batch.
Phase 2 (provide metering over time windows and percentiles):
- Expose the meter of average value of batch's byte size and event count for 1m, 5m 15m windows #17998
- Update documentation describing the windowing metric values for batch metrics #18007
- Create new histogram metric to expose batch size percentiles amongst a time windows (1 min, 5 min, 15min, 1h, 1d) #17895
- Update documentation after final work with the exposure of histograms #18008
- Capture batch metrics from Logstash API, update the tools #17897