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

Middleware that applies per-route slow-transaction thresholds in Glowroot. More...

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

Classes

class  Builder

Public Member Functions

HttpHandler wrap (final HttpHandler next)

Static Public Member Functions

static Builder builder ()
 Returns a new Builder.

Detailed Description

Middleware that applies per-route slow-transaction thresholds in Glowroot.

Different endpoints have different latency characteristics — a PDF export is naturally slower than an auth check. This middleware lets you specify distinct thresholds so Glowroot's slow-trace alerts are meaningful for every route, not just a single global value.

Route matching uses PathNormalizer so patterns with path variables (e.g. /users/:id) match any concrete URL like /users/550e8400-….

Build with the fluent Builder:


middlewareRegistry.add(GlowrootSlowThresholdMiddleware.builder().defaultThreshold(2_000) // 2 s for everything else
.threshold("/api/export/:id", 30_000) // 30 s for exports
.threshold("/api/auth/login", 500) // 500 ms for login
.build());

Definition at line 65 of file GlowrootSlowThresholdMiddleware.java.

Member Function Documentation

◆ builder()

Builder dev.rafex.ether.glowroot.jetty12.GlowrootSlowThresholdMiddleware.builder ( )
static

Returns a new Builder.

Definition at line 76 of file GlowrootSlowThresholdMiddleware.java.

◆ wrap()

HttpHandler dev.rafex.ether.glowroot.jetty12.GlowrootSlowThresholdMiddleware.wrap ( final HttpHandler next)

Implements dev.rafex.ether.http.core.Middleware.

Definition at line 81 of file GlowrootSlowThresholdMiddleware.java.

References dev.rafex.ether.http.core.HttpHandler.handle().

Here is the call graph for this function:

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