Adding 'mean', 'min' or 'percentiles' to Spring Boot 2 metrics?

Gauthier :

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.

Gauthier :

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=441197&siteId=1