diff --git a/ComponentProvider/OpenTelemetrySdk.php b/ComponentProvider/OpenTelemetrySdk.php index 45e35ae..730164e 100644 --- a/ComponentProvider/OpenTelemetrySdk.php +++ b/ComponentProvider/OpenTelemetrySdk.php @@ -14,6 +14,7 @@ use OpenTelemetry\Context\Propagation\TextMapPropagatorInterface; use OpenTelemetry\SDK\Common\Attribute\Attributes; use OpenTelemetry\SDK\Common\Instrumentation\InstrumentationScopeFactory; +use OpenTelemetry\SDK\Logs\EventLoggerProvider; use OpenTelemetry\SDK\Logs\LoggerProvider; use OpenTelemetry\SDK\Logs\LogRecordProcessorInterface; use OpenTelemetry\SDK\Logs\Processor\MultiLogRecordProcessor; @@ -239,12 +240,14 @@ public function createPlugin(array $properties, Context $context): SdkBuilder instrumentationScopeFactory: new InstrumentationScopeFactory(Attributes::factory()), resource: $resource, ); + $eventLoggerProvider = new EventLoggerProvider($loggerProvider); // $sdkBuilder->setTracerProvider($tracerProvider); $sdkBuilder->setMeterProvider($meterProvider); $sdkBuilder->setLoggerProvider($loggerProvider); + $sdkBuilder->setEventLoggerProvider($eventLoggerProvider); return $sdkBuilder; }