Skip to content

Commit

Permalink
Fix loging in rest
Browse files Browse the repository at this point in the history
  • Loading branch information
lil5 committed Dec 19, 2024
1 parent b9bb57e commit 276bfb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/lil5/tigerbeetle_api/config"
"github.com/lil5/tigerbeetle_api/grpc"
"github.com/lil5/tigerbeetle_api/metrics"
"github.com/prometheus/client_golang/prometheus"

metrics_prometheus "github.com/slok/go-http-metrics/metrics/prometheus"
"github.com/slok/go-http-metrics/middleware"
Expand All @@ -28,7 +29,9 @@ func NewServer() {
defer slog.Info("Server exiting")

mdlw := middleware.New(middleware.Config{
Recorder: metrics_prometheus.NewRecorder(metrics_prometheus.Config{}),
Recorder: metrics_prometheus.NewRecorder(metrics_prometheus.Config{
Registry: prometheus.DefaultRegisterer,
}),
})
r.Use(ginmiddleware.Handler("", mdlw))

Expand Down

0 comments on commit 276bfb0

Please sign in to comment.