class RequestTelemetryState implements NonCopyableContext

Constants

private CONTEXT_KEY

Properties

bool $completed
bool $userResolved
array<string, null|array|bool|float|int|string> $userAttributes

Methods

__construct(Request $request, int $startedAt, SpanInterface|null $span, ContextInterface|null $context, ScopeInterface|null $scope, LogContextScope|null $logContextScope, array $activeRequestAttributes, bool $activeRequestRecorded)

Create request-scoped telemetry state.

static void
set(RequestTelemetryState $state)

Store state for the current request coroutine.

static RequestTelemetryState|null
current()

Return state for the current request coroutine.

Details

at line 30
__construct(Request $request, int $startedAt, SpanInterface|null $span, ContextInterface|null $context, ScopeInterface|null $scope, LogContextScope|null $logContextScope, array $activeRequestAttributes, bool $activeRequestRecorded)

Create request-scoped telemetry state.

Parameters

Request $request
int $startedAt
SpanInterface|null $span
ContextInterface|null $context
ScopeInterface|null $scope
LogContextScope|null $logContextScope
array $activeRequestAttributes
bool $activeRequestRecorded

at line 45
static void set(RequestTelemetryState $state)

Store state for the current request coroutine.

Parameters

RequestTelemetryState $state

Return Value

void

at line 53
static RequestTelemetryState|null current()

Return state for the current request coroutine.

Return Value

RequestTelemetryState|null