mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-14 11:22:15 +01:00
feat(prometheus): add new flag --prometheus-metrics-path
This commit is contained in:
@@ -109,6 +109,7 @@ Feature: /debug
|
||||
"prometheus-disable-collect": "false",
|
||||
"prometheus-disable-route-logging": "false",
|
||||
"prometheus-namespace": "gotenberg",
|
||||
"prometheus-metrics-path": "/prometheus/metrics",
|
||||
"webhook-allow-list": "",
|
||||
"webhook-client-timeout": "30s",
|
||||
"webhook-deny-list": "",
|
||||
|
||||
@@ -29,6 +29,31 @@ Feature: /prometheus/metrics
|
||||
Then the Gotenberg container should log the following entries:
|
||||
| "path":"/prometheus/metrics" |
|
||||
|
||||
Scenario: GET /custom/metrics (Custom Metrics Path)
|
||||
Given I have a Gotenberg container with the following environment variable(s):
|
||||
| PROMETHEUS_METRICS_PATH | /custom/metrics |
|
||||
When I make a "GET" request to Gotenberg at the "/custom/metrics" endpoint
|
||||
Then the response status code should be 200
|
||||
Then the response header "Content-Type" should be "text/plain; version=0.0.4; charset=utf-8; escaping=underscores"
|
||||
Then the response body should match string:
|
||||
"""
|
||||
# HELP gotenberg_chromium_requests_queue_size Current number of Chromium conversion requests waiting to be treated.
|
||||
# TYPE gotenberg_chromium_requests_queue_size gauge
|
||||
gotenberg_chromium_requests_queue_size 0
|
||||
# HELP gotenberg_chromium_restarts_count Current number of Chromium restarts.
|
||||
# TYPE gotenberg_chromium_restarts_count gauge
|
||||
gotenberg_chromium_restarts_count 0
|
||||
# HELP gotenberg_libreoffice_requests_queue_size Current number of LibreOffice conversion requests waiting to be treated.
|
||||
# TYPE gotenberg_libreoffice_requests_queue_size gauge
|
||||
gotenberg_libreoffice_requests_queue_size 0
|
||||
# HELP gotenberg_libreoffice_restarts_count Current number of LibreOffice restarts.
|
||||
# TYPE gotenberg_libreoffice_restarts_count gauge
|
||||
gotenberg_libreoffice_restarts_count 0
|
||||
|
||||
"""
|
||||
Then the Gotenberg container should log the following entries:
|
||||
| "path":"/custom/metrics" |
|
||||
|
||||
Scenario: GET /prometheus/metrics (Custom Namespace)
|
||||
Given I have a Gotenberg container with the following environment variable(s):
|
||||
| PROMETHEUS_NAMESPACE | foo |
|
||||
|
||||
Reference in New Issue
Block a user