PromPHP / prometheus_client_php

Prometheus instrumentation library for PHP applications
https://prometheus.io/docs/concepts/metric_types/
Apache License 2.0
423 stars 93 forks source link

Detailed fpm logging #70

Closed thedeacon closed 2 years ago

thedeacon commented 2 years ago

Quick fix to increase the level of detail in the php-fpm access log file. The updated access log format removes %u (the username associated with the request) and adds the following:

The resulting access log entry, formatted with %R %p [%t] \"%m %r\" %s %{micro}d %C %M %l, looks like this:

172.17.0.4 27 [27/Oct/2021:08:27:15 +0000] "GET /examples/some_counter.php" 200 181812 5.50 2097152 0

This is useful in determining execution-time and resource-usage of requests when doing performance testing or when tracking down blackbox testing anomalies. In most cases the access logs are never needed, but when they are this additional detail is nice to have compared to the default log format.

thedeacon commented 2 years ago

abandoning. Need to clean up commit history.