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-server jar 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
  • Classes
    Class
    Description
    Shared worker for the /metrics management endpoint: resolves a consumer-provided Micrometer MeterRegistry from the host bean store and renders a scrape payload.
    Mixin flavor of the /metrics endpoint: renders a Prometheus scrape from a consumer-provided Micrometer MeterRegistry resolved from the host bean store.
    Child-resource flavor of the /metrics endpoint.
    MetricsRecorder bridge that records every @RestOp call as a Micrometer Timer sample on the configured MeterRegistry.