fluent / fluent-plugin-prometheus

A fluent plugin that collects metrics and exposes for Prometheus.
Apache License 2.0
257 stars 79 forks source link

Updating plugin to support latest prometheus ruby client version #180

Closed AntoineC44 closed 3 years ago

AntoineC44 commented 4 years ago

Hello,

I would like to implement the following feature of the ruby prom client: init_label_set that would allow metric init if specified by user in fluent.conf.

Though current fluent-plugin-prometheus build is blocked to old versions <0.10 of prometheus ruby client. init_label_set method is only available in recent versions.

This PR thus aims at using latest prom client version.

In detail

Please note the loss of summary metric quantiles as removed in this Pull Request on prometheus-client repo This effectively means that any summary metric will no longer display quantile labels (e.g. quantile="0.99") but only sum and count. Though personal experience on production environments showed anyway fluentd performance issues when over-using summary quantile computations. Prefer thus histograms instead - with custom buckets if needed - and computation of quantiles on prometheus server side. See the prometheus official documentation on this topic here.

AntoineC44 commented 4 years ago

Looking for some feedback before giving sign-off All tests passed + redid some tests in local

AntoineC44 commented 3 years ago

Hello @repeatedly, is this ok for you?

repeatedly commented 3 years ago

Sorry for the delay. Just merged! I will release new version soon with major version update.