Class MetricsResource

All Implemented Interfaces:
BasicUniversalConfig, DefaultConfig, DefaultHtmlConfig

public class MetricsResource extends BasicRestResource
Child-resource flavor of the /metrics endpoint.

Mounts as a routed child via @Rest(children=MetricsResource.class) under the subtree /metrics and delegates to a shared MetricsManager worker — the same logic the mixin flavor uses, so the two forms cannot drift. Degrades to HTTP 501 when no scrapeable registry bean is present.

See Also:
Since:
10.0.0
  • Constructor Details

  • Method Details

    • getMetrics

      [GET /] - Prometheus scrape of the consumer-provided MeterRegistry.
      Parameters:
      req - The HTTP request.
      Returns:
      The Prometheus exposition text.
      Throws:
      NotImplemented - If no scrapeable MeterRegistry bean is registered.