HttpInstrumentation
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.
Includes configuration, dispatch, error conversion and scope cleanup in one monotonic interval.
Sends a real boundary only to an active observer, without allocating a timeline.
Retains the immutable matched route only until the current observer finishes publishing.
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.
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.
checkpoint
void
checkpoint(HttpCheckpoint $checkpoint, float|null $elapsedMs = null)
Sends a real boundary only to an active observer, without allocating a timeline.
matched
void
matched(RouteMatch $match)
Retains the immutable matched route only until the current observer finishes publishing.
observer
HttpDiagnosticsObserverInterface|null
observer()
Lets request-scoped profiler services share the capture created before bootstrap.