Commit graph

6 commits

Author SHA1 Message Date
Matthias Rampke
7e6d394af0
Make mapper cache metric names more specific
cf. https://github.com/prometheus/statsd_exporter/pull/282#issuecomment-573031514

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
2020-01-10 14:32:16 +00:00
Matthias Rampke
ac3e901f19
Rename mapping cache length metric
The mapper package can be used outside the statsd exporter, so it is
better to use generic names here.

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
2020-01-10 13:10:03 +00:00
bakins
4b69da2d03 mapper cache: Add cache metrics for total gets and hits
Add metrics to record mapper cache hits and total gets.

Signed-off-by: bakins <brian@akins.org>
2020-01-03 16:46:58 -05:00
bakins
e60a0b6d00 Use string concatenation rather than Sprintf
Signed-off-by: bakins <brian@akins.org>
2019-12-31 16:40:33 -05:00
Andy Paine
0135b40c08 Make mapper cache respect metric type
- 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>
2019-06-06 11:33:58 +01:00
SpencerMalone
35d1a99592 Adding mapping cache
Signed-off-by: SpencerMalone <malone.spencer@gmail.com>
2019-04-26 18:00:39 -04:00