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.
The jvm_gc_memory_allocated_bytes_total metrics tells us about size increases of the young generation memory pool, whereas the jvm_gc_memory_promoted_bytes_total metric is for the old generation.
For example, let's look at the metric http_server_requests_seconds_count , that defines the total number of requests received by an endpoint: # HELP http_server_requests_seconds.
MeterRegistry In Micrometer, a MeterRegistry is the core component used for registering meters. We can iterate over the registry and further each meter's metrics to generate a time series in the backend with combinations of metrics and their dimension values. The simplest form of the registry is SimpleMeterRegistry.
Spring Boot provides a metrics endpoint that can be used diagnostically to examine the metrics collected by an application.
After discussions on Github, this is not currently implemented in Micrometer. More details directly on the Github Issues:
https://github.com/micrometer-metrics/micrometer/issues/488#issuecomment-373249656
https://github.com/spring-projects/spring-boot/issues/12433
https://github.com/micrometer-metrics/micrometer/issues/457
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With