SchedulerInstrumentation
class SchedulerInstrumentation extends AbstractInstrumentation
Constants
| protected STATE_CONTEXT_KEY |
|
| protected DURATION_METRIC |
|
| protected EXECUTIONS_METRIC |
|
| protected TASK_ATTRIBUTE |
|
| protected EXIT_CODE_ATTRIBUTE |
|
| protected DURATION_BOUNDARIES |
|
Properties
| protected InstrumentationOptions | $options | from AbstractInstrumentation | |
| protected TracerInterface|null | $tracer | ||
| protected HistogramInterface|null | $duration | ||
| protected CounterInterface|null | $executions |
Methods
Register the instrumentation with normalized options.
Register scheduler listeners and instruments.
Determine whether a metric is enabled.
Index callback observers by their matching instrument name.
Create scheduler instrumentation.
Record enabled scheduled-task metrics.
Details
in
AbstractInstrumentation at line 18
final void
register(array $options)
Register the instrumentation with normalized options.
at line 84
protected void
registerInstrumentation()
Register scheduler 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 69
__construct(Dispatcher $events, TracerProviderInterface $tracerProvider, MeterProviderInterface $meterProvider, ClockInterface $clock, ExceptionContextRegistry $exceptionContexts, OperationOrigin $origins, ProcessIdentity $identity, LogContextScopeFactory $logContextScopes)
Create scheduler instrumentation.
at line 129
protected void
start(ScheduledTaskStarting $event)
Start scheduled-task telemetry.
at line 174
protected void
finish(ScheduledTaskFinished $event)
Complete a successful or non-zero scheduled task.
at line 211
protected void
fail(ScheduledTaskFailed $event)
Complete a failed scheduled task.
at line 255
protected void
recordMetrics(SchedulerTelemetryState $state, int $finishedAt, array $attributes)
Record enabled scheduled-task metrics.
at line 271
protected void
close(SchedulerTelemetryState $state, int $finishedAt)
Close a scheduled-task telemetry scope.
at line 281
protected SchedulerTelemetryState|null
takeState(Event $task)
Remove and return the matching top scheduled-task state.
at line 305
protected string
taskName(Event $task)
Return a stable scheduled-task identity.