Skip to content

Commit 4719912

Browse files
committed
Debug statement to get more info on why metrics are disabled
1 parent ba7970d commit 4719912

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gen3workflow/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ def get_app(httpx_client=None) -> FastAPI:
6969
f"Setting up Metrics with app.metrics.enabled flag set to {app.metrics.enabled=}"
7070
)
7171
if app.metrics.enabled:
72+
logger.debug(
73+
f"Vieweing metrics associated with the registry {app.metrics._registry.collect()=}"
74+
)
7275
app.mount("/metrics", app.metrics.get_asgi_app())
7376

7477
@app.middleware("http")
@@ -98,7 +101,7 @@ async def middleware_log_response_and_api_metric(
98101
f"Adding metrics for request made to {path=} with method {method=}"
99102
)
100103
metrics = app.metrics
101-
logger.debug(f"Metrics object: {metrics=}")
104+
logger.debug(f"Metrics object: {str(metrics)}")
102105
metrics.add_create_task_api_interaction(
103106
method=method,
104107
path=path,

0 commit comments

Comments
 (0)