feat: add duration metrics for collectors
adds metrics to capture duration of time spent collecting metrics for:
- cluster_health
- clustersettings
- index_stats
- node_stats
- snapshot_stats
this feature was adapted from the caarlos0/elasticsearch_exporter repo.
There seem to be a lot of metrics missing from the README, so I just added the metrics that this PR addresses, but I want to ensure that all metrics are in the README in a future PR.
Hmm, typically we add this kind of thing as a gauge. For example in the node_exporter, this is how we handle it.
Thanks for the feedback @SuperQ! I have updated the metrics be be gauge types.
Curious in this one too. I'd like to see if we have a performance issues with queries and it's a bit hard to see right now.
@SuperQ We have been talking about a refactor, would these changes be better suited to be included there?
This needs a rebase.
this metrics might be really useful, any chance this PR will get processed?