diff --git a/apps/metrics/webapi/providers/metrics.py b/apps/metrics/webapi/providers/metrics.py index 612bbef..18d23d2 100644 --- a/apps/metrics/webapi/providers/metrics.py +++ b/apps/metrics/webapi/providers/metrics.py @@ -1,18 +1,17 @@ import logging from prometheus_fastapi_instrumentator import Instrumentator -from common.config.site_settings import site_settings - def register(app): - instrumentator = ( - Instrumentator().instrument( - app, - metric_namespace="freeleaps-mertics", - metric_subsystem=site_settings.NAME) - ) + # Prometheus metric prefix is : freeleaps_metrics + instrumentator = ( + Instrumentator().instrument( + app, + metric_namespace="freeleaps", + metric_subsystem="metrics", ) + ) - @app.on_event("startup") - async def startup(): - instrumentator.expose(app, endpoint="/api/_/metrics", should_gzip=True) - logging.info("Metrics endpoint exposed at /api/_/metrics") \ No newline at end of file + @app.on_event("startup") + async def startup(): + instrumentator.expose(app, endpoint="/api/_/metrics", should_gzip=True) + logging.info("Metrics endpoint exposed at /api/_/metrics")