The Go client for prometheus aggregates summary metrics over 10
minutes by default, in 5 buckets. This is not always the behaviour we
want.
Allow tweaking those settings in `statsd_exporter`, so we can
aggregate summary metrics over more or less time, with more or fewer
buckets, and set the cap for the bucket as well.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Currently the Buckets and Quantiles settings are top level settings per metric
in the yaml. In a subsequent commit we're going to allow adding more such
options for summaries, at which point having them all at the top level gets
confusing.
Split the options out into separate hierarchies to allow adding more options,
without adding confusion. We preserve backwards compatibility by still
accepting the old option, but warning when it is present.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
- Statsd allows users to provide a metric with the same name but
differing types (counter, gauge, timer)
- The exporter allows this by letting users specify a
"match_metric_type" in the mapping config
- However the mapper cache does not look at the metric type so it would
return a MetricMapperCacheResult for the type of the first metric with
that name that the exporter saw
- Add MetricType to the signature for the cache and format the metric
name with the type to provide unique keys for a metric with the same
name but differing type
Signed-off-by: Andy Paine <andy.paine@digital.cabinet-office.gov.uk>