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

Jetty-level Handler.Wrapper that provides comprehensive Glowroot APM instrumentation in a single handler, designed for use with dev.rafex.ether.http.jetty12.JettyMiddleware-based architectures. More...

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

Classes

class  Builder

Public Member Functions

boolean handle (final Request request, final Response response, final Callback callback) throws Exception

Static Public Member Functions

static Builder builder ()
 Returns a new Builder.

Detailed Description

Jetty-level Handler.Wrapper that provides comprehensive Glowroot APM instrumentation in a single handler, designed for use with dev.rafex.ether.http.jetty12.JettyMiddleware-based architectures.

Combines all the capabilities of the ether-level middleware suite into one Jetty handler, making it compatible with projects that use Jetty's Handler.Wrapper chain rather than the ether HttpExchange middleware model.

What it instruments

  • Transaction type/name"Web" + "METHOD /normalized/path"
  • Response statushttp.status and http.status_class
  • Authenticated userGlowroot.setTransactionUser() via configurable extractor
  • Request ID — from a configurable header (e.g. X-Request-Id), with optional UUID generation
  • Health check suppression — raises slow-threshold to max for probe paths
  • Per-route slow thresholds — different thresholds per normalized path
  • Error attributeserror and error.message on uncaught exceptions

Usage (Jetty middleware / Kiwi-style registration)


final var glowroot = GlowrootJettyHandler.builder().healthPath("/health").requestIdHeader("X-Request-Id")
.defaultSlowThreshold(2_000).userExtractor(ctx -> ctx instanceof MyAuthContext a ? a.subject() : null)
.build();

middlewareRegistry.add(glowroot::wrap); // Kiwi
etherMiddlewares.add(glowroot::wrap); // ether JettyMiddleware

Definition at line 87 of file GlowrootJettyHandler.java.

Member Function Documentation

◆ builder()

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

Returns a new Builder.

Definition at line 107 of file GlowrootJettyHandler.java.

◆ handle()

boolean dev.rafex.ether.glowroot.jetty12.GlowrootJettyHandler.handle ( final Request request,
final Response response,
final Callback callback ) throws Exception

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