stable
Clone or download
request #14516: Replace jimdo/prometheus_client_php by tuleap/prometheus-client
This will allow us to re-use the same Redis connection between the instrumentation and other tasks and to have the full control on how the connection is opened and with which settings. The library also contains a few fixes for multiple small things and the internal refactoring will also help if we want to implement type of metrics that are currently not supported like the summaries. The way the Prometheus client stores its information has changed a bit (loosely typed vs strictly typed) and therefore the previous data must be cleared otherwise the /metrics page crashes. In order to do so, a command 'prometheus_metrics:clear' is introduced. However to keep things as simple for administrators, Tuleap tries to cleanup opportunely the persistent datastore. Change-Id: I524d4c7cfe21f4bc7bf53a1c76221ff69fb7a70e
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/prometheus_metrics/include/ClearPrometheusMetricsCommand.php | +53 | −0 | Go to diff View file |
M | plugins/prometheus_metrics/include/MetricsCollector.php | +16 | −14 | Go to diff View file |
M | plugins/prometheus_metrics/include/MetricsController.php | +19 | −3 | Go to diff View file |
A | plugins/prometheus_metrics/include/PrometheusFlushableStorageProvider.php | +40 | −0 | Go to diff View file |
M | plugins/prometheus_metrics/include/prometheus_metricsPlugin.php | +17 | −0 | Go to diff View file |
A | plugins/prometheus_metrics/phpunit/ClearPrometheusMetricsCommandTest.php | +44 | −0 | Go to diff View file |
M | plugins/prometheus_metrics/phpunit/MetricsControllerTest.php | +2 | −0 | Go to diff View file |
A | plugins/prometheus_metrics/phpunit/PrometheusFlushableStorageProviderTest.php | +43 | −0 | Go to diff View file |
M | src/common/Instrument/Prometheus/Prometheus.php | +56 | −41 | Go to diff View file |
M | src/common/Project/ServiceInstrumentation.php | +6 | −5 | Go to diff View file |
M | src/common/Request/FrontRouter.php | +19 | −8 | Go to diff View file |
M | src/common/Request/RequestInstrumentation.php | +32 | −22 | Go to diff View file |
M | src/common/include/URLVerification.class.php | +2 | −1 | Go to diff View file |
M | src/composer.json | +6 | −6 | Go to diff View file |
M | src/composer.lock | +64 | −61 | Go to diff View file |
M | src/www/api/index.php | +7 | −3 | Go to diff View file |
M | src/www/include/pre.php | +3 | −1 | Go to diff View file |
M | src/www/index.php | +4 | −1 | Go to diff View file |
M | src/www/soap/index.php | +3 | −1 | Go to diff View file |
M | tests/phpunit/common/Plugin/PluginLegacyControllerTest.php | +0 | −5 | Go to diff View file |
M | tests/phpunit/common/Request/FrontRouterTest.php | +34 | −23 | Go to diff View file |