worldia / instrumentation-bundle
Installs: 53 330
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 6
Forks: 10
Open Issues: 2
Type:symfony-bundle
Requires
Requires (Dev)
Suggests
- open-telemetry/exporter-otlp: To export telemetry data to an OTLP compatible ingester (Jaeger, Tempo, Loki, etc.)
- symfony/monolog-bundle: To enable open-telemetry logging
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.2.1
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- dev-master / 1.0.x-dev
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-beta7
- 1.0.0-beta6
- 1.0.0-beta5
- 1.0.0beta4
- 1.0.0beta3
- 1.0.0.beta2
- 1.0.0beta1
- 0.0.45
- 0.0.44
- 0.0.43
- 0.0.42
- 0.0.41
- 0.0.40
- 0.0.39
- 0.0.38
- 0.0.37
- 0.0.36
- 0.0.35
- 0.0.34
- 0.0.33
- 0.0.32
- 0.0.31
- 0.0.30
- 0.0.29
- 0.0.28
- 0.0.27
- 0.0.26
- 0.0.25
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.21
- 0.0.20
- 0.0.19
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-move-to-phpunit
- dev-chore/add-missing-method
- dev-feat/tracing-http-with-body-callbacks
- dev-feat/use-noop-tracer-provider-if-disabled
- dev-cleanup
- dev-fix/trace-response-body
- dev-feat/filter-headers
- dev-fix/stream-tracing
- dev-chore/freeze-opentelemetry-version
- dev-feat/opentelemetry-meter-interface
- dev-fix/lint
- dev-add-operation-name-to-response-code-metric
- dev-only-set-generic-404-op-name-when-no-route-was-resolved
- dev-keep-http-response-content-even-when-throwing
- dev-null-op-tracer
- dev-fix-issue-25
This package is auto-updated.
Last update: 2025-01-16 12:32:55 UTC
README
Using the official OpenTelemetry SDK.
Features
- Minimal auto-instrumentation for requests, console commands, consumers and doctrine
- Trace context propagation from incoming requests to consumers and outgoing http calls
- Minimal metrics for requests, consumers and messages
- Trace context propagation for database requests (using
sqlcommenter
)
Full working example
For a fully working example including Jaeger, Grafana, Tempo, Loki and Prometheus, check the example directory.
Installation and configuration
Install along your exporter implementation, eg. open-telemetry/exporter-otlp
.
composer require worldia/instrumentation-bundle open-telemetry/exporter-otlp
Add to bundles.php
.
return [ // Other bundles Instrumentation\InstrumentationBundle::class => ['all' => true], ];
Configure OTEL env vars. Replace <your-telemetry-collector>
by yours, eg. jaeger
, tempo
, otel-collector
, ...
OTEL_SERVICE_NAME=test-app OTEL_PHP_DETECTORS=none OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=Delta OTEL_EXPORTER_OTLP_PROTOCOL=http/json OTEL_EXPORTER_OTLP_ENDPOINT=http://<your-telemetry-collector>:4318
Enable the extension. See the complete configuration reference here or run bin/console config:dump-reference instrumentation
.
instrumentation: ~ monolog: handlers: otel: type: service id: Instrumentation\Logging\OtelHandler