linavel/opentelemetry-auto-lumen

OpenTelemetry auto-instrumentation for Lumen

Maintainers

Package info

github.com/linaadamson/opentelemetry-auto-lumen

pkg:composer/linavel/opentelemetry-auto-lumen

Transparency log

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-07-24 18:05 UTC

This package is auto-updated.

Last update: 2026-07-27 17:33:04 UTC


README

Releases Issues

Originally based on the Laravel auto-instrumentation in https://github.com/open-telemetry/opentelemetry-php-contrib (Apache-2.0), adapted for Lumen and maintained independently in this repository.

OpenTelemetry Lumen auto-instrumentation

Please read https://opentelemetry.io/docs/instrumentation/php/automatic/ for instructions on how to install and configure the extension and SDK.

Overview

Auto-instrumentation hooks are registered via composer, and spans will automatically be created.

Installation

composer require linavel/opentelemetry-auto-lumen

OTEL_* environment variables must be available before the OpenTelemetry SDK bootstraps, which happens as soon as Composer's autoloader loads. Lumen's own environment loading normally runs after the autoloader, so _loadenv.php needs to be required directly, before vendor/autoload.php, in your project's bootstrap/app.php:

require __DIR__.'/../vendor/linavel/opentelemetry-auto-lumen/_loadenv.php';
require __DIR__.'/../vendor/autoload.php';

_loadenv.php reads the .env file at your project root and exports any OTEL_* keys via putenv() so they're visible to the SDK during autoloading.

Configuration

The extension can be disabled via runtime configuration: