Skip to content

TelemetryPlugin

Wires the OTel-SDK-dependent exporter bootstrap (TelemetryBootstrap) into the generic event seams instead of Kernel calling it by hard FQCN.

The always-on Trace facade this exporter feeds (Trace, TraceRegistry, the no-op handles) stays in core regardless — only the SDK-backed provider setup/flush moves through this seam.

KernelBootEvent fires at the end of Quiote::bootstrap(), which every Quiote\Runtime\Kernel::bootstrap() call already goes through before it used to call TelemetryBootstrap::configureFromConfig() directly — routing the same call through this listener changes nothing observable. WorkerRequestCompletedEvent fires once per request from Kernel’s worker-mode reset step, replacing the old direct TelemetryBootstrap::flushAfterRequest() call there.

Not yet an installable package (Quiote\Telemetry\TelemetryBootstrap and the OTel-SDK classes still live in this repo, and Quiote::bootstrap() runs this plugin unconditionally today — see the “core default” note there) — when the exporter moves to quioteframework/telemetry-otel, that core-default call is deleted and this plugin (unchanged) is registered via the plugins config key instead, exactly like McpPlugin.

final class TelemetryPlugin implements PluginInterface

ImplementsPluginInterface
SourceTelemetryPlugin.php
MethodDescription
register(PluginRegistrar $registrar): voidBinds TelemetryBootstrap to the kernel lifecycle events.

public function register(PluginRegistrar $registrar): void

Binds TelemetryBootstrap to the kernel lifecycle events.

KernelBootEvent configures the providers and exporters from config; WorkerRequestCompletedEvent flushes them once per request in worker mode.

ParameterTypeDescription
$registrarPluginRegistrar