QueueInstrumentation
class QueueInstrumentation extends AbstractInstrumentation
Traits
Constants
| protected SENT_MESSAGES_METRIC |
|
| protected SEND_DURATION_METRIC |
|
| protected CONSUMED_MESSAGES_METRIC |
|
| protected PROCESS_DURATION_METRIC |
|
| protected SYSTEM_NAME_ATTRIBUTE |
|
| protected DESTINATION_NAME_ATTRIBUTE |
|
| protected OPERATION_NAME_ATTRIBUTE |
|
| protected OPERATION_TYPE_ATTRIBUTE |
|
| protected MESSAGE_ID_ATTRIBUTE |
|
| protected MESSAGE_ENVELOPE_SIZE_ATTRIBUTE |
|
| protected OPERATION_TYPE_SEND |
|
| protected OPERATION_TYPE_PROCESS |
|
| protected SYSTEM_NAME_AWS_SQS |
|
| protected DEPTH_METRIC |
|
| protected OUTBOX_DELIVERED_METRIC |
|
| protected OUTBOX_DURATION_METRIC |
|
| protected OUTBOX_LATENCY_METRIC |
|
| protected CONNECTION_ATTRIBUTE |
|
| protected DURATION_BOUNDARIES |
|
Properties
| protected InstrumentationOptions | $options | from AbstractInstrumentation | |
| protected TracerInterface|null | $tracer | ||
| protected CounterInterface|null | $sentMessages | ||
| protected HistogramInterface|null | $sendDuration | ||
| protected CounterInterface|null | $consumedMessages | ||
| protected HistogramInterface|null | $processDuration | ||
| protected CounterInterface|null | $outboxDelivered | ||
| protected HistogramInterface|null | $outboxDuration | ||
| protected HistogramInterface|null | $outboxLatency | ||
| protected bool | $propagation | ||
| protected array<string, string> | $connectionDrivers | ||
| protected array<string, true> | $syncConnections | ||
| protected QueueConsumerState> | $consumerStates |
Methods
Register the instrumentation with normalized options.
Register queue listeners, propagation, and instruments.
Determine whether a metric is enabled.
Determine whether the throwable is a direct coroutine cancellation.
Return the semantic conventions schema URL for Hypervel instrumentation scopes.
Index callback observers by their matching instrument name.
Create queue instrumentation.
Create enabled queue metric instruments.
Register outbox delivery metrics without observing or resolving ordinary queue operations.
Record confirmed acceptance separately from publication or settlement failure.
Inject propagation and start a persistent producer span.
Complete persistent producer telemetry.
Complete producer telemetry from its started state.
Return a framework UUID from a rewritten terminal payload.
Register flat propagation for local asynchronous queue drivers.
Start consumer telemetry when a job reaches application processing.
Register collection-only queue depth in event worker zero.
Return low-cardinality attributes shared by queue spans and metrics.
Return configured connection drivers by connection name.
Return a queue operation span name.
Details
in
AbstractInstrumentation at line 21
final void
register(array $options)
Register the instrumentation with normalized options.
at line 159
protected void
registerInstrumentation()
Register queue listeners, propagation, and instruments.
in
AbstractInstrumentation at line 35
protected bool
tracesEnabled()
Determine whether trace output is enabled.
in
AbstractInstrumentation at line 43
protected bool
metricEnabled(string $name)
Determine whether a metric is enabled.
in
AbstractInstrumentation at line 53
protected bool
isDirectCancellation(Throwable|null $exception)
Determine whether the throwable is a direct coroutine cancellation.
Ending an operation by direct cancellation is control flow, not a failure.
in
AbstractInstrumentation at line 64
protected string
schemaUrl()
Return the semantic conventions schema URL for Hypervel instrumentation scopes.
Every tracer, meter and logger obtained for one scope must pass the same URL.
in
AbstractInstrumentation at line 79
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 140
__construct(Dispatcher $events, Repository $config, QueueManager $queues, TracerProviderInterface $tracerProvider, MeterProviderInterface $meterProvider, ClockInterface $clock, TextMapPropagatorInterface $propagator, ExceptionContextRegistry $exceptionContexts, OperationOrigin $origins, ProcessIdentity $identity, LogContextScopeFactory $logContextScopes)
Create queue instrumentation.
at line 244
protected void
registerMetrics()
Create enabled queue metric instruments.
at line 290
protected void
registerOutboxMetrics()
Register outbox delivery metrics without observing or resolving ordinary queue operations.
at line 329
protected void
recordOutboxDelivery(OutboxBatchDelivered|OutboxBatchDeliveryFailed $event)
Record confirmed acceptance separately from publication or settlement failure.
at line 352
protected void
finalizePayload(JobPayloadFinalizing $event)
Inject propagation and start a persistent producer span.
at line 430
protected void
finishProducer(string $payload, Throwable|null $exception = null, bool $sendAttempted = true)
Complete persistent producer telemetry.
at line 449
protected void
completeProducer(QueueProducerState $state, Throwable|null $exception, bool $sendAttempted)
Complete producer telemetry from its started state.
at line 488
protected string|null
payloadUuid(string $payload)
Return a framework UUID from a rewritten terminal payload.
at line 504
protected void
registerLocalPropagation()
Register flat propagation for local asynchronous queue drivers.
at line 534
protected void
startConsumer(JobProcessing $event)
Start consumer telemetry when a job reaches application processing.
at line 623
protected void
recordConsumerError(Job $job, Throwable $exception)
Retain the first ordinary consumer failure.
at line 638
protected void
recordConsumerTimeout(Job $job)
Retain a timeout when no earlier failure explains the attempt.
at line 652
protected void
finishConsumer(JobAttempted $event)
Complete consumer telemetry at the canonical attempt boundary.
at line 711
protected void
registerDepthMetric()
Register collection-only queue depth in event worker zero.
at line 763
protected array
attributes(string $connection, string|null $queue, string $operation, string $operationType)
Return low-cardinality attributes shared by queue spans and metrics.
at line 783
protected array
connectionDrivers()
Return configured connection drivers by connection name.
at line 805
protected string
spanName(string $operation, string|null $queue)
Return a queue operation span name.