Download the PHP package open-telemetry/opentelemetry-auto-psr3 without Composer
On this page you can find all versions of the php package open-telemetry/opentelemetry-auto-psr3. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download open-telemetry/opentelemetry-auto-psr3
More information about open-telemetry/opentelemetry-auto-psr3
Files in open-telemetry/opentelemetry-auto-psr3
Package opentelemetry-auto-psr3
Short Description OpenTelemetry auto-instrumentation for PSR-3 (Logger Interface).
License Apache-2.0
Homepage https://opentelemetry.io/docs/php
Informations about the package opentelemetry-auto-psr3
This is a read-only subtree split of https://github.com/open-telemetry/opentelemetry-php-contrib.
OpenTelemetry PSR-3 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 depending on the mode, will:
- automatically inject trace id and span id into log message context of any psr3 logger; or
- transform the message into the OpenTelemetry LogRecord format, for export to an OpenTelemetry logging-compatible backend
Mode
The package can operate in two modes, controlled by the environment variable OTEL_PHP_PSR3_MODE
:
inject
Inject traceId
and spanId
of the active trace span into the context of each logged message. Depending on the PSR-3 implementation,
the values may be written to the log output, or may be available for interpolation into the log message.
For example:
export
The logged output will be processed and emitted by the logger as normal, but the output will also be encoded using the OpenTelemetry log model and can be exported to an OpenTelemetry-compatible backend.
Configuration
The extension can be disabled via runtime configuration:
All versions of opentelemetry-auto-psr3 with dependencies
ext-opentelemetry Version *
open-telemetry/api Version ^1.0
open-telemetry/sem-conv Version ^1.24
psr/log Version ^1 || ^2 || ^3