Measure Symfony's httpClient and Doctrine queries execution time and create Prometheus metrics

448 Views Asked by At

there are actually two separate questions under this title

  • I am trying to figure out how to measure the requests duration made to external services in Symfony application via the httpClient and same for Doctrine queries. For Doctrine queries I am considering option to create Lifecycle Event Listener and measure pre post timestamps of request but I think they are only for create/update/delete operations but not for get. Also performance is concern with this approach.

  • Also I am still getting familiar with Prometheus but I would like to post those values as metrics to Prometheus (I would figure out this eventually after I get the data). I have promphp/prometheus_client_php installed and basic metrics are running fine.

Would be grateful if someone faced similar case to share some opinion.

0

There are 0 best solutions below