Skip to content

Commit 379eeba

Browse files
committed
feat(server): suppress uvicorn startup messages in metrics server
1 parent e7ffa2d commit 379eeba

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/server/metrics_server.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,15 @@ def start_metrics_server(host: str = "127.0.0.1", port: int = 9090) -> None:
5454
5555
"""
5656
logger.info("Starting metrics server on %s:%s", host, port)
57-
uvicorn.run(metrics_app, host=host, port=port)
57+
58+
# Configure uvicorn to suppress startup messages to avoid duplicates
59+
# since the main server already shows similar messages
60+
uvicorn.run(
61+
metrics_app,
62+
host=host,
63+
port=port,
64+
log_config=None, # Disable uvicorn's default logging config
65+
access_log=False, # Disable access logging for metrics server
66+
# Suppress uvicorn's startup messages by setting log level higher
67+
log_level="warning",
68+
)

0 commit comments

Comments
 (0)