artprima / prometheus-metrics-bundle

Symfony 5/6 Prometheus Metrics Bundle
MIT License
133 stars 29 forks source link

Add option to disable php info metric (#58) #63

Closed Johnmeurt closed 2 years ago

Johnmeurt commented 2 years ago

This PR provides a new option disable_default_prometheus_metrics to disable the default metrics php_info from promphp/prometheus_client_php.

This metric is sent during initialization of the instance of Prometheus\CollectorRegistry. This usually means during injection of the collector registry instance. This will initialize the connection of the adapter. If the communication failed the exception will not be catched which will have an impact on business layer.

codecov-commenter commented 2 years ago

Codecov Report

Merging #63 (84e4d0e) into master (f62150f) will increase coverage by 1.02947%. The diff coverage is 100.00000%.

@@                  Coverage Diff                  @@
##                master         #63         +/-   ##
=====================================================
+ Coverage     81.08974%   82.11921%   +1.02947%     
  Complexity          97          97                 
=====================================================
  Files               12          12                 
  Lines              312         302         -10     
=====================================================
- Hits               253         248          -5     
+ Misses              59          54          -5     
Impacted Files Coverage Δ
...cyInjection/ArtprimaPrometheusMetricsExtension.php 100.00000% <100.00000%> (ø)
DependencyInjection/Configuration.php 98.43750% <100.00000%> (ø)
...njection/Compiler/ResolveAdapterDefinitionPass.php 78.57143% <0.00000%> (-1.42856%) :arrow_down:
Metrics/AppMetrics.php 98.24561% <0.00000%> (-0.14149%) :arrow_down:
EventListener/MetricsCollectorListener.php 60.37736% <0.00000%> (+1.11811%) :arrow_up:
...njection/Compiler/RegisterMetricsCollectorPass.php 68.42105% <0.00000%> (+9.33014%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f62150f...84e4d0e. Read the comment docs.

denisvmedia commented 2 years ago

There is an issue with the tests, but that's not the problem of this PR. I will fix it later.

Johnmeurt commented 2 years ago

I have forgotten to add some documentation. I will take care of it.