final class HttpInstrumentation (View source)

internal  This is a synchronous boundary shared by Kernel and standalone Framework entrypoints, with no application timing API. It retains neither metrics nor checkpoint history between calls.
 

Runs the HTTP entrypoint's operation and publishes one summary after its request scope closes.

Methods

Shares the database instrument with root-owned connections and accepts one optional profiler factory.

ResponseInterface
handle(ServerRequestInterface|null $request, callable $prepare, callable $dispatch, callable $failure)

Includes configuration, dispatch, error conversion and scope cleanup in one monotonic interval.

ResponseInterface
void
checkpoint(HttpCheckpoint $checkpoint, float|null $elapsedMs = null)

Sends a real boundary only to an active observer, without allocating a timeline.

void
void

Retains the immutable matched route only until the current observer finishes publishing.

void

Lets request-scoped profiler services share the capture created before bootstrap.

Details

__construct

__construct(ContainerInterface $container, DatabaseInstrumentation $database, HttpDiagnosticsObserverFactoryInterface|null $observerFactory = null)

Shares the database instrument with root-owned connections and accepts one optional profiler factory.

Parameters

ContainerInterface $container
DatabaseInstrumentation $database
HttpDiagnosticsObserverFactoryInterface|null $observerFactory

handle

ResponseInterface handle(ServerRequestInterface|null $request, callable $prepare, callable $dispatch, callable $failure)

Includes configuration, dispatch, error conversion and scope cleanup in one monotonic interval.

The dispatch callback owns and closes its scope before returning. The failure callback maps application errors to responses; diagnostics failures cannot replace those responses.

Parameters

ServerRequestInterface|null $request
callable $prepare
callable $dispatch
callable $failure

Return Value

ResponseInterface

checkpoint

void checkpoint(HttpCheckpoint $checkpoint, float|null $elapsedMs = null)

Sends a real boundary only to an active observer, without allocating a timeline.

Parameters

HttpCheckpoint $checkpoint
float|null $elapsedMs

Return Value

void

matched

void matched(RouteMatch $match)

Retains the immutable matched route only until the current observer finishes publishing.

Parameters

RouteMatch $match

Return Value

void

observer

Lets request-scoped profiler services share the capture created before bootstrap.