https://github.com/cdwv/opentelemetry-auto-magento
OpenTelemetry auto-instrumentation for Magento 2 Framework
https://github.com/cdwv/opentelemetry-auto-magento
Last synced: 12 months ago
JSON representation
OpenTelemetry auto-instrumentation for Magento 2 Framework
- Host: GitHub
- URL: https://github.com/cdwv/opentelemetry-auto-magento
- Owner: cdwv
- License: mit
- Created: 2025-05-26T09:57:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-01T11:17:14.000Z (about 1 year ago)
- Last Synced: 2025-07-01T12:23:23.193Z (about 1 year ago)
- Language: PHP
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenTelemetry Auto Instrumentation for Magento 2 Framework
This package provides minimal auto-instrumentation for Magento 2 application.
Work is still in progress, so all the span names can (and probably will) change.
Currently it has the ability to provide some basic instrumentation for several of the main components
of Magento 2 stack.
# Features
At this point, there are only some basic hooks to instrument critical points of the request flow.
For specific integrations, please refer to other auto-instrumentations.
# Configuration
This package doesn't contain any specific configuration. Due to specifics of Magento bootstrap process
it doesn't make much sense to provide configuration through Magento control panel – it leaves some
parts of the request uninstrumented.
All the configuration variables that are described in [OpenTelemetry Environment Variable Specification](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/)
and [PHP SDK Specification](https://opentelemetry.io/docs/languages/php/sdk/) should be available, if the appropriate packages are installed.
```
OTEL_SERVICE_NAME=magento_service
OTEL_PHP_AUTOLOAD_ENABLED=true
OTEL_PHP_TRACE_CLI_ENABLED=true
OTEL_EXPORTER=otlp
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp-exporter-endpoint
OTEL_EXPORTER_OTLP_HEADERS=authorization=Basic dXNlcm5hbWU6cGFzc3dvcmQ=
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=http/json
OTEL_PROPAGATORS=tracecontext
OTEL_TRACES_SAMPLER=parentbased_always_on
```