Skip to content

Commit

Permalink
feat: expose metrics at /metrics on api port (#254)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 authored Oct 17, 2024
1 parent 181fd3b commit e937f26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit e937f26

Please sign in to comment.