micrometer-metrics / micrometer

An application observability facade for the most popular observability tools. Think SLF4J, but for observability.
https://micrometer.io
Apache License 2.0
4.47k stars 990 forks source link

[GraphiteReporter] MetricAttribute type is appended in the last tag value #2085

Closed f-michaut closed 4 years ago

f-michaut commented 4 years ago

Hello,

I am reporting metrics to Graphite, using a GraphiteReporter. Since Graphite support tags, I'm using them in my metrics.

For instance I have the following meter : registry.counter("my.counter", Tag.of("version", "SNAPSHOT")); I'm expecting my tag to have the value SNAPSHOT, and a serie named something like my.counter.count.

But when I look the series name in Graphite I have the following : my.counter;version=SNAPSHOT.count And when I'm looking for the values of the tag version, I don't have SNAPSHOT, but this : image

The problem is that Graphite allows the dot character in the tag value, and the GraphiteReporter append the MettricAttribute after the serie's name and tags have been concatenated.

The serie should look like my.counter.count;version=SNAPSHOT instead of my.counter;version=SNAPSHOT.count when sended to Graphite-carbon.

jkschneider commented 4 years ago

Is this a duplicate of https://github.com/micrometer-metrics/micrometer/issues/2069?

f-michaut commented 4 years ago

Yeah, it seems so, should I close this ?

jkschneider commented 4 years ago

Thanks for checking @Francois-Michaut-Epitech (and the initial report). I'll close and tag as duplicate.