Skip to content

Commit e937f26

Browse files
authored
feat: expose metrics at /metrics on api port (#254)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 181fd3b commit e937f26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/api/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ func Start(cfg *config.Config) error {
121121
// Set metrics router
122122
metrics.Expose(metricsRouter)
123123
// Use metrics middleware without exposing path in main app router
124-
metrics.UseWithoutExposingEndpoint(router)
124+
metrics.SetMetricPath("/metrics")
125+
metrics.Use(router)
125126

126127
// Custom metrics
127128
failureMetric := &ginmetrics.Metric{

0 commit comments

Comments
 (0)