Class HttpErrorHandlingPolicy
Object
HttpErrorHandlingPolicy
Controls how the
HTTPServer handles exceptions raised while scraping metrics.
The default policy built by builder() does not expose exception details and does not
report the exception. Configure the builder to route diagnostic details to an
application-appropriate sink.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a builder for configuring scrape error handling.Returns a synchronous reporter that logs scrape exceptions atLevel.SEVEREusing JUL.
-
Method Details
-
builder
Returns a builder for configuring scrape error handling.The builder defaults to a generic HTTP 500 response with no error reporter. This avoids exposing exception details to scrape clients or adding an implicit dependency on an application's logging configuration.
-
julReporter
Returns a synchronous reporter that logs scrape exceptions atLevel.SEVEREusing JUL.Reporting is opt-in; the default policy does not log scrape exceptions.
-