- Issue created by @murz
- last update
about 1 year ago 6 pass - @murz opened merge request.
- Status changed to Fixed
about 1 year ago 1:20pm 10 October 2023 - Status changed to Fixed
about 1 year ago 1:36pm 10 October 2023
We have a dependency on the opentelemetry
service in ExceptionTraceEventSubscriber, so if we get an exception in the opentelemetry
service initialization, we have a circular reference problem:
The website encountered an unexpected error. Please try again later.
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "opentelemetry", path: "Drupal\opentelemetry\EventSubscriber\RequestTraceEventSubscriber -> opentelemetry -> OpenTelemetry\SDK\Trace\TracerProvider -> OpenTelemetry\SDK\Trace\SpanProcessor\SimpleSpanProcessor -> OpenTelemetry\Contrib\Otlp\SpanExporter -> Drupal\opentelemetry\EventSubscriber\ExceptionTraceEventSubscriber". in Drupal\Component\DependencyInjection\Container->get() (line 147 of core/lib/Drupal/Component/DependencyInjection/Container.php).
To resolve this problem will be good to remove the opentelemetry
service from the dependencies of ExceptionTraceEventSubscriber
and load it on demand.
Fixed
1.0
Code