HttpServerInstrumentation
class HttpServerInstrumentation extends AbstractInstrumentation
Constants
| protected DURATION_BOUNDARIES |
|
Properties
| protected InstrumentationOptions | $options | from AbstractInstrumentation | |
| protected array<string, true> | $knownMethods | ||
| protected array<string, true> | $excludedMethods | ||
| protected list<string> | $excludedPaths | ||
| protected bool | $userContext | ||
| protected bool | $userContextOnly | ||
| protected TracerInterface|null | $tracer | ||
| protected HistogramInterface|null | $duration | ||
| protected UpDownCounterInterface|null | $activeRequests | ||
| protected HttpTelemetryAttributes | $httpAttributes |
Methods
Register the instrumentation with normalized options.
Register HTTP server listeners and instruments.
Determine whether a metric is enabled.
Index callback observers by their matching instrument name.
Create HTTP server instrumentation.
Return attributes available when request processing starts.
Return recording-only request attributes.
Return attributes available when request processing completes.
Return recording-only response attributes.
Return the application exception retained by a Hypervel response.
Details
in
AbstractInstrumentation at line 18
final void
register(array $options)
Register the instrumentation with normalized options.
at line 106
protected void
registerInstrumentation()
Register HTTP server listeners and instruments.
in
AbstractInstrumentation at line 32
protected bool
tracesEnabled()
Determine whether trace output is enabled.
in
AbstractInstrumentation at line 40
protected bool
metricEnabled(string $name)
Determine whether a metric is enabled.
in
AbstractInstrumentation at line 55
protected array
indexObservers(array $names, array $observers)
Index callback observers by their matching instrument name.
The SDK supplies observers in the same order as the instruments passed to batchObserve(), so the unchanged name order is the mapping contract.
at line 89
__construct(Dispatcher $events, TracerProviderInterface $tracerProvider, MeterProviderInterface $meterProvider, TextMapPropagatorInterface $propagator, ResponsePropagatorInterface $responsePropagator, HeaderBagGetter $headerGetter, ResponseHeadersSetter $responseSetter, ClockInterface $clock, LogContextScopeFactory $logContextScopes, UserContextResolver $userContexts)
Create HTTP server instrumentation.
at line 194
protected void
requestReceived(RequestReceived $event)
Start telemetry for an accepted request.
at line 272
protected void
requestHandled(RequestHandled $event)
Inject configured response propagation before transport send.
at line 293
protected void
responseSent(ResponseSent $event)
Complete telemetry at the response transport boundary.
at line 372
protected array
methodAttributes(Request $request)
Return normalized method attributes for a server request.
at line 396
protected array
activeRequestAttributes(Request $request, array $methodAttributes)
Return attributes available when request processing starts.
at line 410
protected array
requestTraceAttributes(Request $request, array $methodAttributes)
Return recording-only request attributes.
at line 436
protected array
completionAttributes(Request $request, array $startAttributes, int|null $statusCode, string|null $errorType)
Return attributes available when request processing completes.
at line 460
protected array
responseTraceAttributes(Response $response)
Return recording-only response attributes.
at line 477
protected Throwable|null
responseException(Response|null $response)
Return the application exception retained by a Hypervel response.