Middleware that suppresses Glowroot slow-transaction alerts for infrastructure paths such as health checks, readiness probes, and metrics. More...
Public Member Functions | |
| HttpHandler | wrap (final HttpHandler next) |
Static Public Member Functions | |
| static GlowrootHealthExclusionMiddleware | defaults () |
Creates an instance excluding DEFAULT_PATHS. | |
| static GlowrootHealthExclusionMiddleware | of (final String... paths) |
| Creates an instance with the given exact paths. | |
Static Public Attributes | |
| static final Set< String > | DEFAULT_PATHS = Set.of("/health", "/ready", "/live", "/metrics") |
Paths used by defaults(). | |
Middleware that suppresses Glowroot slow-transaction alerts for infrastructure paths such as health checks, readiness probes, and metrics.
For matching paths the slow-transaction threshold is raised to Long#MAX_VALUE milliseconds, so they never appear in Glowroot's slow-trace list. They will still be recorded normally; only the slow flag is suppressed.
Use defaults() for the most common Kubernetes/Docker health endpoints, or of(String...) to specify your own set:
// Default paths: /health, /ready, /live, /metrics
middlewareRegistry.add(GlowrootHealthExclusionMiddleware.defaults());
// Custom paths
middlewareRegistry.add(GlowrootHealthExclusionMiddleware.of("/ping", "/status"));
Definition at line 61 of file GlowrootHealthExclusionMiddleware.java.
|
static |
Creates an instance excluding DEFAULT_PATHS.
Definition at line 83 of file GlowrootHealthExclusionMiddleware.java.
References DEFAULT_PATHS.
|
static |
Creates an instance with the given exact paths.
| paths | paths to suppress (e.g. "/ping", "/status") |
GlowrootHealthExclusionMiddleware for those paths Definition at line 78 of file GlowrootHealthExclusionMiddleware.java.
| HttpHandler dev.rafex.ether.glowroot.jetty12.GlowrootHealthExclusionMiddleware.wrap | ( | final HttpHandler | next | ) |
Implements dev.rafex.ether.http.core.Middleware.
Definition at line 88 of file GlowrootHealthExclusionMiddleware.java.
References dev.rafex.ether.http.core.HttpHandler.handle().
|
static |
Paths used by defaults().
Definition at line 64 of file GlowrootHealthExclusionMiddleware.java.
Referenced by defaults().