ttrss/vendor/open-telemetry/context/fiber/initialize_fiber_handler.php

21 lines
447 B
PHP
Raw Normal View History

2023-10-20 14:12:29 +00:00
<?php
/** @noinspection PhpElementIsNotAvailableInCurrentPhpVersionInspection */
/** @phan-file-suppress PhanUndeclaredClassReference */
declare(strict_types=1);
namespace OpenTelemetry\Context;
use Fiber;
if (!class_exists(Fiber::class)) {
return;
}
if (ZendObserverFiber::isEnabled() && ZendObserverFiber::init()) {
// ffi fiber support enabled
} else {
Context::setStorage(new FiberBoundContextStorage(Context::storage()));
}