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
Simon Pasquier
8f56cc811d
*: add staticcheck target back
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-04 15:26:57 +01:00
Ivan Mikheykin
d1b2dd47a8
TTL expiration tests, README update
...
Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
2018-12-18 09:46:05 +03:00
Ivan Mikheykin
e1a3a5fc32
Configured ttl value for stale metrics
...
Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
2018-12-18 08:39:23 +03:00
Wangchong Zhou
c10e80c44b
optimizations
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-10-03 16:31:00 -07:00
Wangchong Zhou
fcf11f02e5
promote formatLabels to mapper package
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-28 14:03:19 -07:00
Wangchong Zhou
5262b2904c
tidy up and use go benchmark
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-28 12:58:25 -07:00
Wangchong Zhou
e634997791
move fsm to sepeare pkg
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-21 18:10:51 -07:00
Wangchong Zhou
a751c0c091
cleanup
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-13 12:23:59 -07:00
Wangchong Zhou
9ebab25dfa
ordering
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-13 12:12:41 -07:00
Wangchong Zhou
c2742aa299
implement backtrack
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-12 18:18:12 -07:00
Wangchong Zhou
dad04e9c8b
detect backtracking
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-12 14:44:07 -07:00
Wangchong Zhou
bfe23298aa
replace glob matching
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-11 17:34:19 -07:00
Wangchong Zhou
825b734b3e
Implement "fsm" match type
...
Signed-off-by: Wangchong Zhou <fffonion@gmail.com>
2018-09-10 12:04:44 -07:00
Matthias Rampke
d9f305b6f2
Inject the mappings count metric into the library package
...
so that it can be initialized with an exporter-specific name.
Signed-off-by: Matthias Rampke <mr@soundcloud.com>
2018-08-14 09:31:38 +00:00
Matthias Rampke
40a13e604f
Move mapper -> pkg/mapper
...
to make clear that this is meant to be used elsewhere
Signed-off-by: Matthias Rampke <mr@soundcloud.com>
2018-08-14 09:20:00 +00:00