class OpenTelemetryLifecycle

Traits

LogsMessagesTrait

Properties

protected bool $ownsCliLifecycle
protected bool $terminatingListenerRegistered
protected int $activeCliCommandsInCoroutine

Methods

__construct(OpenTelemetryManager $manager, ExportScheduler $scheduler, Repository $config, Dispatcher $events)

Create an OpenTelemetry lifecycle coordinator.

void
startWorker(AfterWorkerStart $event)

Bind an event or task worker and start periodic export.

void
startCli()

Bind the standalone CLI lifecycle.

void
beginCliCommand()

Mark a selected CLI command as active.

void
endCliCommand()

Mark a selected CLI command as complete.

void
startProcess(BeforeProcessHandle $event)

Bind a custom server process unless its class is excluded.

void
finishProcess(AfterProcessHandle $event)

Close a custom server-process lifecycle.

void
terminate(Terminating $event)

Close the standalone CLI lifecycle.

void
registerTerminatingListener()

Register the CLI shutdown listener once after the first successful bind.

void
close()

Close providers while isolating automatic telemetry failures.

Details

at line 32
__construct(OpenTelemetryManager $manager, ExportScheduler $scheduler, Repository $config, Dispatcher $events)

Create an OpenTelemetry lifecycle coordinator.

Parameters

OpenTelemetryManager $manager
ExportScheduler $scheduler
Repository $config
Dispatcher $events

at line 43
void startWorker(AfterWorkerStart $event)

Bind an event or task worker and start periodic export.

Parameters

AfterWorkerStart $event

Return Value

void

at line 61
void startCli()

Bind the standalone CLI lifecycle.

Return Value

void

at line 80
void beginCliCommand()

Mark a selected CLI command as active.

Return Value

void

at line 94
void endCliCommand()

Mark a selected CLI command as complete.

Return Value

void

at line 112
void startProcess(BeforeProcessHandle $event)

Bind a custom server process unless its class is excluded.

Parameters

BeforeProcessHandle $event

Return Value

void

at line 136
void finishProcess(AfterProcessHandle $event)

Close a custom server-process lifecycle.

Parameters

AfterProcessHandle $event

Return Value

void

at line 148
void terminate(Terminating $event)

Close the standalone CLI lifecycle.

Parameters

Terminating $event

Return Value

void

at line 162
protected void registerTerminatingListener()

Register the CLI shutdown listener once after the first successful bind.

Return Value

void

at line 177
protected void close()

Close providers while isolating automatic telemetry failures.

Return Value

void