41f2ddea37
Reorder conditional for CLI check, then URI comparison.
...
- Reordered the condition to first check for CLI mode before URI comparison.
2024-06-03 23:41:42 +02:00
24f1f6c974
Add content type header for metrics endpoint
...
Set the Content-Type header to 'text/plain; version=0.0.4' for the '/metrics' endpoint and CLI requests.
2024-06-03 19:48:39 +02:00
6f26907181
Adjust handling of boolean values in metrics output
...
Ensure boolean values are converted to integers for consistency.
2024-06-03 19:48:39 +02:00
aea6873ed8
Refactor error handling for GuzzleException
...
- Refactored error handling to check for response in exception.
2024-06-03 19:48:39 +02:00
51ab7bcde6
Refactor HTTP request handling for response status check
...
- Added try-catch block to handle GuzzleException
- Updated logic to check for response status before processing
2024-06-03 19:48:39 +02:00
201c935330
Refactor HTTP request handling and data extraction
...
- Improved handling of HTTP requests and extraction of response data.
2024-06-03 19:48:39 +02:00
66933d7d19
Update URI check to include CLI request detection.
...
The code now checks if the request URI is '/metrics' or if the PHP script is running from the command line interface (CLI). This change allows for proper handling of CLI requests in addition to web requests.
2024-06-03 19:48:39 +02:00
7c61ead8ac
Refactor HTTP handling, update Guzzle requests and Twig config.
...
- Refactored HTTP handling to use nested arrays for options
- Updated Guzzle requests based on new array structure
- Adjusted Twig cache configuration in the code
2024-06-03 19:48:39 +02:00
638e6d9346
Refactor Guzzle HTTP requests for flexibility and proxy support
...
Restructured Guzzle HTTP requests to allow for additional options like proxy support, enhancing flexibility in handling different types of requests.
2024-06-03 19:48:39 +02:00
a726fa024c
Add handling for HTTP response time metric using GuzzleHttp.
2024-06-03 19:48:39 +02:00
d0fa8a6a99
Update handling of value assignment when 'jsonelem' is not set.
...
- Adjusted code to assign $output directly to 'value' if 'jsonelem' is not set.
2024-06-03 19:48:39 +02:00
5d76b42c23
Added the first code
2024-06-03 19:48:39 +02:00