'Dynatrace registry for Micrometer changes behaviour of Actuator counters
I'm using Spring-Boot 2.4.13 and Micrometer 1.8.3 to implement a few counters with Actuator.
public class MetricRegistration {
@Autowired
private MeterRegistry registry;
@PostConstruct
private void init(){
Counter
.builder("test.counter.total")
.description("just a test")
.register(registry);
}
I can see Spring injecting that MeterRegistry with a SimpleMeterRegistry and the Counter with a CumulativeCounter.
When I add the Dynatrace-Registration to the classpath via gradle
runtime 'io.micrometer:micrometer-registry-dynatrace:1.8.3'
SimpleMeterRegistry becomes a DynatraceMeterRegistry which is a StepMeterRegistry. The the CumulativeCounter becomes a StepCounter. These classes behave entirely different.
Is it possible the run the Actuator counter still with the CumulativeCounter while reporting to Dynatrace with the StepCounters?
The total count of the Actuator counter is needed from other applications.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
