Class MetricsResource
java.lang.Object
org.apache.juneau.rest.server.servlet.RestResource
org.apache.juneau.rest.server.servlet.BasicRestResource
org.apache.juneau.rest.server.metrics.micrometer.MetricsResource
- All Implemented Interfaces:
BasicUniversalConfig,DefaultConfig,DefaultHtmlConfig
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.rest.server.servlet.RestResource
RestResource.Builder<R extends RestResource,SELF extends RestResource.Builder<R, SELF>>, RestResource.DefaultBuilder<R extends RestResource> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMetrics(RestRequest req) [GET /] - Prometheus scrape of the consumer-provided MeterRegistry.Methods inherited from class org.apache.juneau.rest.server.servlet.RestResource
builder, doLog, getContext, getPaths, getRequest, getResponse, getRestBuilder, log, log, setContext
-
Constructor Details
-
MetricsResource
public MetricsResource()
-
-
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 scrapeableMeterRegistrybean is registered.
-