Package org.apache.juneau.rest.server.metrics.micrometer
package org.apache.juneau.rest.server.metrics.micrometer
Micrometer bridge for the
juneau-rest-server
MetricsRecorder SPI.
This module is opt-in and ships a single class —
MicrometerMetricsRecorder — that bridges
per-request metric events from juneau-rest-server to a Micrometer
MeterRegistry. Consumers wire one as a
@Bean MetricsRecorder on their resource and pick the Micrometer registry that matches
their downstream (Prometheus, StatsD, JMX, Datadog, NewRelic, etc.).
Containment
The io.micrometer:micrometer-core dependency is declared in provided scope on
this module's POM. Consumers that want Micrometer-backed metrics must add micrometer-core
themselves at the version of their choice along with their preferred MeterRegistry. This
way:
- The core
juneau-rest-serverjar stays Micrometer-free. - Services that never opt in pay zero classpath cost.
- Services that DO opt in pick their own Micrometer version (security upgrades, CVE patches) without waiting for a Juneau release.
See Also:
- Since:
- 10.0.0
-
ClassesClassDescriptionShared worker for the
/metricsmanagement endpoint: resolves a consumer-provided MicrometerMeterRegistryfrom the host bean store and renders a scrape payload.Mixin flavor of the/metricsendpoint: renders a Prometheus scrape from a consumer-provided MicrometerMeterRegistryresolved from the host bean store.Child-resource flavor of the/metricsendpoint.MetricsRecorderbridge that records every@RestOpcall as a MicrometerTimersample on the configuredMeterRegistry.