tbachert/otel-async-revolt-adapter

OpenTelemetry Revolt adapter

v0.1.2 2024-01-11 15:19 UTC

This package is auto-updated.

Last update: 2024-10-11 23:13:17 UTC


README

Propagates the current open-telemetry/context to revolt/event-loop callbacks.

$context = Context::getCurrent();
EventLoop::queue(fn() => assert($context === Context::getCurrent()));

Installation

composer require tbachert/otel-async-revolt-adapter

Usage

The adapter is automatically injected for the global event loop.
If you use a local event loop or set a new driver using EventLoop::setDriver() you must wrap the driver manually using RevoltDriver::wrap().