Nexus API Reference

ServerSpanMiddleware
in package
implements MiddlewareInterface

FinalYes
Tags
psalm-api

PSR-15 middleware that opens an OpenTelemetry Server span for each request. It is the span source of truth: it extracts the inbound trace context, starts and activates the span (so any actor ask/tell inside the handler links as a child), records http.* attributes and the response status, records handler exceptions, and always ends the span. All telemetry is fail-isolated — a telemetry error never breaks the request; the handler's own exception still propagates to the exception-handling middleware.

Table of Contents

Interfaces

MiddlewareInterface

Methods

__construct()  : mixed
process()  : ResponseInterface

Methods

process()

public process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

        
On this page

Search results