QueueInstrumentation
class QueueInstrumentation extends AbstractInstrumentation
Traits
Constants
| protected SENT_MESSAGES_METRIC |
|
| protected SEND_DURATION_METRIC |
|
| protected CONSUMED_MESSAGES_METRIC |
|
| protected PROCESS_DURATION_METRIC |
|
| protected DEPTH_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 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.
Index callback observers by their matching instrument name.
Create queue instrumentation.
Create enabled queue metric instruments.
Inject propagation and start a persistent producer span.
Complete persistent producer telemetry.
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 18
final void
register(array $options)
Register the instrumentation with normalized options.
at line 125
protected void
registerInstrumentation()
Register queue listeners, propagation, 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 106
__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 201
protected void
registerMetrics()
Create enabled queue metric instruments.
at line 247
protected void
finalizePayload(JobPayloadFinalizing $event)
Inject propagation and start a persistent producer span.
at line 329
protected void
finishProducer(string $payload, Throwable|null $exception = null)
Complete persistent producer telemetry.
at line 376
protected string|null
payloadUuid(string $payload)
Return a framework UUID from a rewritten terminal payload.
at line 392
protected void
registerLocalPropagation()
Register flat propagation for local asynchronous queue drivers.
at line 422
protected void
startConsumer(JobProcessing $event)
Start consumer telemetry when a job reaches application processing.
at line 511
protected void
recordConsumerError(Job $job, Throwable $exception)
Retain the first ordinary consumer failure.
at line 526
protected void
recordConsumerTimeout(Job $job)
Retain a timeout when no earlier failure explains the attempt.
at line 540
protected void
finishConsumer(JobAttempted $event)
Complete consumer telemetry at the canonical attempt boundary.
at line 598
protected void
registerDepthMetric()
Register collection-only queue depth in event worker zero.
at line 648
protected array
attributes(string $connection, string|null $queue, string $operation, string $operationType)
Return low-cardinality attributes shared by queue spans and metrics.
at line 668
protected array
connectionDrivers()
Return configured connection drivers by connection name.
at line 690
protected string
spanName(string $operation, string|null $queue)
Return a queue operation span name.