Closed
Description
Calling .counter() for a StackdriverMeterRegistry creates a GAUGE metric instead of CUMULATIVE metric.
This is basically a repost of a previously reported bug because that one is closed.
#2231
Environment
- Micrometer latest version (io.micrometer:micrometer-registry-stackdriver:latest.release)
- Stackdriver Micrometer registry
- macOS
- Java version: 15
To Reproduce
How to reproduce the bug:
Example:
MeterRegistry registry = StackdriverMeterRegistry.builder(stackdriverConfig).build();
Counter x = registry.counter("example_counter","example_key","20");
someUserCaseIncrementingCounter(x);
Will create a gauge metric and not a cumulative one in Cloud Monitoring.
Expected behavior
Create a CUMULATIVE Metric instead of a Gauge Metric
Additional context
User @tmarszal has proposed changes to fix this bug.
tmarszal@9e6809f