From 8b3c4d32281fbb6ff05f1fb2aa22d63129fa4fd4 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:04:18 +0000 Subject: [PATCH] exclude more endpoints from metrics --- src/web/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/web/main.py b/src/web/main.py index adc837d..826cc03 100644 --- a/src/web/main.py +++ b/src/web/main.py @@ -51,7 +51,7 @@ def app_factory(settings = get_settings()): app.include_router(interoperability_router) # prometheus exposed in /metrics with authentication - Instrumentator(should_group_status_codes=False, excluded_handlers=["/metrics", "/health"]).instrument(app).expose(app, dependencies=[Depends(token_api_key_auth)]) + Instrumentator(should_group_status_codes=False, excluded_handlers=["/metrics", "/health", "/openapi.json", "/favicon.ico"]).instrument(app).expose(app, dependencies=[Depends(token_api_key_auth)]) local_dir = settings.SERVE_LOCAL_ARCHIVE if not os.path.isdir(local_dir) and os.path.isdir(local_dir.replace("/app", ".")):