Class HttpErrorHandlingPolicy.Builder
Object
Builder
- Enclosing class:
HttpErrorHandlingPolicy
Builder for
HttpErrorHandlingPolicy.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the policy.errorReporter(Consumer<? super Exception> errorReporter) Pass scrape exceptions toerrorReporter.unsafeDebugResponse(boolean unsafeDebugResponse) Configure whether the HTTP 500 response includes the full exception stack trace.
-
Method Details
-
errorReporter
Pass scrape exceptions toerrorReporter.The reporter runs synchronously on the HTTP request thread. It should return promptly and must be safe to call concurrently. Runtime exceptions thrown by the reporter are isolated from HTTP response handling.
-
unsafeDebugResponse
Configure whether the HTTP 500 response includes the full exception stack trace.Security warning: Setting this to
trueexposes internal exception information to scrape clients. Do not enable it for endpoints reachable by untrusted clients.This setting is independent of
errorReporter(Consumer). -
build
Build the policy.
-