uru / opentelemetry-auto-slim-legacy
OpenTelemetry auto-instrumentation for Slim Framework with legacy attributes support.
0.0.2
2024-11-27 19:29 UTC
Requires
- php: ^8.0
- ext-opentelemetry: *
- ext-reflection: *
- open-telemetry/api: ^1.0
- open-telemetry/sem-conv: ^1.24
- slim/slim: ^4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- mockery/mockery: ^1.5
- nyholm/psr7: *
- open-telemetry/opentelemetry-propagation-server-timing: *
- open-telemetry/opentelemetry-propagation-traceresponse: *
- open-telemetry/sdk: ^1.0
- phan/phan: ^5.0
- php-http/mock-client: *
- phpstan/phpstan: ^1.1
- phpstan/phpstan-mockery: ^1.1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.18.4
- vimeo/psalm: ^5.0
README
This is a fork https://github.com/opentelemetry-php/contrib-auto-slim with legacy attributes support.
http.status_code
used as copy ofhttp.response.status_code
;http.url
used as copy ofurl.full
;http.method
used as copy ofhttp.request.method
;http.user_agent
used as copy ofuser_agent.original
;http.scheme
used as copy ofurl.scheme
;http.request_content_length_uncompressed
used as copy ofhttp.request.body.size
;http.response_content_length_uncompressed
used as copy ofhttp.response.body.size
;http.target
added to attributes;http.host
added to attributes;
Installation
Run composer require uru/opentelemetry-auto-slim-legacy
.
OpenTelemetry Slim Framework 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 for:
App::handle()
- root spanInvocationStrategyInterface
- controller/actionRoutingMiddleware::performRouting
- update root span's name with either route name or pattern
Configuration
The extension can be disabled via runtime configuration:
OTEL_PHP_DISABLED_INSTRUMENTATIONS=slim