Repository navigation
Conversation
5b6cdb9 to
5a5db1a
Compare
|
Quoted below: written with Claude, an LLM, as CONTRIBUTING.md asks us to mark. The builds and test runs behind it are on my machine; the commands to repeat them are under the fold.
|
|
Quoted below: written with Claude, an LLM, as CONTRIBUTING.md asks us to mark. The builds and test runs behind it are on my machine; the commands to repeat them are under the fold.
|
|
To be clear, my approach was to make the output as similar as possible to the well-established php-fpm_exporter to make the migration to php-fpm smooth. I didn't pay close attention to #12759, besides noticing that it doesn't even try to make the refactor that this part of the codebase was sorely needing. Detailed output comparisonphp-fpm_exporter (/metrics)php-fpm_exporter output has lots of fluff metrics that start with this PR (/status?openmetrics&full)Everything above Main differences
|
|
Quoted below: written with Claude, an LLM, as CONTRIBUTING.md asks us to mark. The builds and test runs behind it are on my machine; the commands to repeat them are under the fold.
|
As a first step towards cleaning up the current logic we extract plaintext handling into its own static function.
5a5db1a to
12725c6
Compare
|
I realized it makes sense to add the I did this in an extra commit, and took the opportunity to rebase the branch on master. |
12725c6 to
a8ee816
Compare
Closes #9494, alternative to #12759
The former logic was quite a mess and I saw no way to fit the OpenMetrics per-worker stats into the existing control flow, so I extracted each format handling into its own static function and
fpm_status_handle_request()became a simple dispatcher to the specialized handler. For text/html/xml/json these functions are a bit repetitive, but for OpenMetrics this design allows the flexibility to have a different control flow that doesn't interfere with the other formats.The new metrics try to follow those of php-fpm_exporter as close as possible with only very minor differences (the
scrape_urilabel is not present, and the state "Getting request informations" is now "Getting request information" as per the existing constants in FPM.phpfpm_scrape_failuresis also not present).I tried to organize the commits to ease review, each one does a logical step and compiles and passes the tests.