I would like to log dynamic tag values for the DistrbutionSummary metric, how can I do that?
在以下例子中,有一个称为“我方”的标签,我希望根据所收到的数据,将标记的价值记录在传单上。 我可能想把分发摘要记录下来的多个方面,除非实时,否则我不会知道这些标签价值。
DistributionSummary histogram = DistributionSummary.builder("my_histogram")
.description("Example histogram")
.baseUnit("ms")
.publishPercentiles(0.5, 0.95)
.tags("myTag", "myTagVal")
.serviceLevelObjectives(100.0, 500.0, 1000.0)
.distributionStatisticExpiry(Duration.ofMinutes(5))
.distributionStatisticBufferLength(3)
.register(meterRegistry);
For eg., Metrics.counter from micrometer has a way to pass the value for the tags on the fly while incrementing or recording the value. how can we do the same in DistributionSummary?
Metrics.counter("eventsProcessed", "myTag", anyValue).increment(count);