Gander is a preconfigured Open Telemetry stack relying on Prometheus, Grafana, and Grafana Tempo.
ddev get tag1consulting/ddev-gander
, run Drupal core's OpenTelemetry phpunit tests, and immediately see performance metrics and traces in a Grafana dashboard. Or add PerformanceTestBase coverage to an existing project with a few lines of code if you already have phpunit functional test coverage of your project.
For more information on the phpunit side of things, see the Drupal core change record.
For more information check the documentation.
- Install ddev if you haven't already.
- Enable ddev on your local Drupal project.
- Ensure you can already run functional JavaScript tests in the ddev environment. This requires a working chromedriver container as part of your ddev installation. You can run any core functional javascript test without having Gander installed to confirm.
For most use cases, this chrome image should work out of the box:
ddev get ddev/ddev-selenium-standalone-chrome
Add Gander and run Drupal's performance tests via a git clone of Drupal core (assuming composer is used):
ddev get tag1consulting/ddev-gander
ddev restart
ddev ssh
cd web/
- To run a single test three times in order to check the Gander installation, ensure you're in the document root first:
for run in 1..3; do ../vendor/bin/phpunit -c core profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php --filter hot; done;
- To run all OpenTelemetry tests:
../vendor/bin/phpunit -c core --group OpenTelemetry
- Check the Grafana dashboard via: http://<projectname>.ddev.site:3000/