Fix Prometheus exporter for management and health endpoints

This commit is contained in:
ngosang 2023-08-03 06:36:31 +02:00
parent d1588c1156
commit 40bd1cba4c

View File

@ -33,6 +33,10 @@ def prometheus_plugin(callback):
def export_metrics(actual_response):
res = V1ResponseBase(actual_response)
if res.startTimestamp is None or res.endTimestamp is None:
# skip management and healthcheck endpoints
return
domain = "unknown"
if res.solution and res.solution.url:
parsed_url = urllib.parse.urlparse(res.solution.url)