build(monitoring): implement open-telemetry support

This commit is contained in:
2024-08-03 19:30:13 +02:00
parent 4361655127
commit 0bff14f820
6 changed files with 1061 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
services:
Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory'
http_discovery.psr17_factory:
class: Http\Discovery\Psr17Factory

View File

@@ -4,7 +4,11 @@ monolog:
when@dev:
monolog:
handlers:
otel:
type: service # I wouldn't use this in a real application in @dev environment
id: App\Bridge\Monolog\Handler\SymfonyOtelHandler
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"