14

I am using the new MicroMeter metrics in Spring Boot 2 version 2.0.0-RELEASE.

When publishing metrics over the /actuator/metrics/{metric.name} endpoint, i get the following:

For a DistributionSummary :

"name": "sources.ingestion.rate",
    "measurements": [
        {
           "statistic": "COUNT",
            "value": 5
        },
        {
            "statistic": "TOTAL",
            "value": 72169.44162067816
        },
        {
            "statistic": "MAX",
            "value": 17870.68010661754
        }
    ],
    "availableTags": []
}

For a Timer :

{
    "name": "sources.ingestion",
    "measurements": [
        {
            "statistic": "COUNT",
            "value": 5
        },
        {
            "statistic": "TOTAL_TIME",
            "value": 65.700878648
        },
        {
            "statistic": "MAX",
            "value": 22.661545322
        }
    ],
    "availableTags": []
}

Is it possible to enrich the measurements to add measures like mean, min, or percentiles ?

For percentiles i tried using .publishPercentiles(0.5, 0.95), but that doesn't reflect on the actuator endpoint.

gotson
  • 3,613
  • 1
  • 23
  • 40

2 Answers2

6

After discussions on Github, this is not currently implemented in Micrometer. More details directly on the Github Issues:

gotson
  • 3,613
  • 1
  • 23
  • 40
1

Now you can implement percentiles-histogram like this:

  metrics:
    distribution:
      percentiles-histogram:
        http.server.requests: true

Then you can see histogram data in /actuator/prometheus, but can not see in /metrics. Because it Weill generate only for endpoint which supports histogram .

Mavlarn
  • 3,807
  • 2
  • 37
  • 57