From d32c62075f19adf01227b67b8ecba729238c7c0b Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 17 Oct 2024 15:36:16 -0400 Subject: [PATCH] feat: expose metrics at /metrics on api port Signed-off-by: Chris Gianelloni --- internal/api/api.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/api/api.go b/internal/api/api.go index 45e83e8..b37b25f 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -121,7 +121,8 @@ func Start(cfg *config.Config) error { // Set metrics router metrics.Expose(metricsRouter) // Use metrics middleware without exposing path in main app router - metrics.UseWithoutExposingEndpoint(router) + metrics.SetMetricPath("/metrics") + metrics.Use(router) // Custom metrics failureMetric := &ginmetrics.Metric{