Ether Framework
Unified API docs for Ether modules
Loading...
Searching...
No Matches
dev.rafex.ether.glowroot.jetty12.GlowrootHealthExclusionMiddleware Class Reference

Middleware that suppresses Glowroot slow-transaction alerts for infrastructure paths such as health checks, readiness probes, and metrics. More...

Inheritance diagram for dev.rafex.ether.glowroot.jetty12.GlowrootHealthExclusionMiddleware:
Collaboration diagram for dev.rafex.ether.glowroot.jetty12.GlowrootHealthExclusionMiddleware:

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().

Detailed Description

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.

Member Function Documentation

◆ defaults()

GlowrootHealthExclusionMiddleware dev.rafex.ether.glowroot.jetty12.GlowrootHealthExclusionMiddleware.defaults ( )
static

Creates an instance excluding DEFAULT_PATHS.

Definition at line 83 of file GlowrootHealthExclusionMiddleware.java.

References DEFAULT_PATHS.

◆ of()

GlowrootHealthExclusionMiddleware dev.rafex.ether.glowroot.jetty12.GlowrootHealthExclusionMiddleware.of ( final String... paths)
static

Creates an instance with the given exact paths.

Parameters
pathspaths to suppress (e.g. "/ping", "/status")
Returns
a new GlowrootHealthExclusionMiddleware for those paths

Definition at line 78 of file GlowrootHealthExclusionMiddleware.java.

◆ wrap()

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().

Here is the call graph for this function:

Member Data Documentation

◆ DEFAULT_PATHS

final Set<String> dev.rafex.ether.glowroot.jetty12.GlowrootHealthExclusionMiddleware.DEFAULT_PATHS = Set.of("/health", "/ready", "/live", "/metrics")
static

Paths used by defaults().

Definition at line 64 of file GlowrootHealthExclusionMiddleware.java.

Referenced by defaults().


The documentation for this class was generated from the following file: