spring-bootprometheusmicrometerspring-micrometer

Spring Boot management.metrics.distribution.percentiles examples


There's a config property for Spring Boot management.metrics.distribution.percentiles the type of a value of the property is Map<String, double[]>

e.g. it may be set as following:

management.metrics.distribution.percentiles:
   all: 0.5, 0.95

the questions are:

  1. what are some other common keys (like key=all) for the entries of this map? like can one restrict percentiles to http server requests only?
  2. and where to look for them? (maybe some source code references?)
  3. how can one define custom keys

Solution

  • The list of metric names can be found at /actuator/metrics endpoint.

    And the custom metric names could be set in annotation like @Timed("exact.metric.name")