Reputation: 3690
I do understand micrometer observation. And i see that it supports adding lowCardinalityKeyValue
and highCardinalityKeyValue
with something like below -
Observation observation = Observation.start("my.operation", registry)
.contextualName("span name")
.lowCardinalityKeyValue("this.tag", "will end up as a meter tag and a span tag")
.highCardinalityKeyValue("but.this.tag", "will end up as a span tag only");
I do understand what these KeyValues mean, but can some one give a real world use case where such distinguishing make more sense.
Upvotes: 0
Views: 463
Reputation: 6931
This article might help by explaining what cardinality means, what difference it makes for metrics and why it is important to distinguish low and high cardinality (with examples): https://develotters.com/posts/high-cardinality/
The official documentation of Micrometer also talks about this (with examples): https://docs.micrometer.io/micrometer/reference/observation/introduction.html
The javadoc of the Observation
class has an example as well.
But here are a few other:
High cardinality
/users/12345
)Low cardinality
/users/{id}
)Upvotes: 0