The "open-telemetry/context" library started to use the FiberBoundContextStorage by default, which relies on the function Fiber::getCurrent()
.
But Drupal started to use the function Fiber::getCurrent()
too, in the Renderer and BigPipe.
That leads to conflicts because Drupal Kernel calls the Fiber::getCurrent()->suspend()
which puts the OpenTelemetry FiberBoundContextStorage service on suspend.
The temporary workaround is to force set the simple OpenTelemetry\Context\ContextStorage()
on the initialization stage:
function OpentelemetryTraceManager::__construct() {
...
// Force disable the FiberBoundContextStorage because of the conflict
// with Drupal Renderer service.
// @todo Make a proper fix to work well with the FiberBoundContextStorage.
$contextStorage = new ContextStorage();
Context::setStorage($contextStorage);
...
We need to investigate this and find a fix on the Drupal or OpenTelemetry side.
Active
1.0
Code