PHP demo project illustrating PHPUnit OpenTelemetry monitoring using flow-php/phpunit-telemetry-bridge.
- Docker (with Docker Compose)
- GNU Make
make install # install Composer deps in the PHP container
make up # start the OTEL collector + Grafana stack
make test # run the suite; telemetry is exported to OTEL
make grafana # open Grafana (or visit http://localhost:3000)Running bare make defaults to make test.
Grafana is available at http://localhost:3000. Two dashboards are provisioned:
- PHPUnit overview — the default home dashboard.
- PHPUnit memory — memory usage across the suite.
All data is filtered by the service name phpunit-otel-sandbox. Raw test metrics are also exposed by the collector at http://localhost:8889/metrics.
Run make help to list every available target. The main ones:
| Target | Description |
|---|---|
make install |
Install Composer dependencies in the container |
make test |
Run the full test suite (default target) |
make coverage |
Run the tests with text coverage (PCOV) |
make up |
Start the observability stack (OTEL collector + Grafana) |
make down |
Stop and remove the containers |
make grafana |
Open the Grafana dashboard |
make logs |
Tail the OTEL collector logs |
make shell |
Open a shell in the PHP container |
make clean |
Stop the stack and remove the volumes |