mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
* handle failures gracefully * fix super-subtle race condition * address feedback: panic instead of fatal log and make vars into consts * pass the frankenphp context to worker-ready function * reset backoff and failures on normal restart * update docs * add test and fix race condition * fail sometimes but do not be pathological about it * Use title case Co-authored-by: Kévin Dunglas <kevin@dunglas.fr> * fix code style in php * define lifecycle metrics * ensure we update unregister the metrics and fix tests * update caddy tests and fix typo * update docs * no need for this --------- Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
1.1 KiB
1.1 KiB
Metrics
When Caddy metrics are enabled, FrankenPHP exposes the following metrics:
frankenphp_[worker]_total_workers: The total number of workers.frankenphp_[worker]_busy_workers: The number of workers currently processing a request.frankenphp_[worker]_worker_request_time: The time spent processing requests by all workers.frankenphp_[worker]_worker_request_count: The number of requests processed by all workers.frankenphp_[worker]_ready_workers: The number of workers that have calledfrankenphp_handle_requestat least once.frankenphp_[worker]_worker_crashes: The number of times a worker has unexpectedly terminated.frankenphp_[worker]_worker_restarts: The number of times a worker has been deliberately restarted.frankenphp_total_threads: The total number of PHP threads.frankenphp_busy_threads: The number of PHP threads currently processing a request (running workers always consume a thread).
For worker metrics, the [worker] placeholder is replaced by the worker script path in the Caddyfile.