Skip to content

Commit

Permalink
Update metrics listener
Browse files Browse the repository at this point in the history
  • Loading branch information
neekolas committed Mar 21, 2024
1 parent 1ab1e4f commit 9cee384
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net"
"net/http"

"github.com/pires/go-proxyproto"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/xmtp/xmtp-node-go/pkg/tracing"
Expand All @@ -24,9 +25,9 @@ func NewMetricsServer(ctx context.Context, address string, port int, log *zap.Lo
log: log.Named("metrics"),
}

var err error
addr := fmt.Sprintf("%s:%d", address, port)
s.http, err = net.Listen("tcp", addr)
httpListener, err := net.Listen("tcp", addr)
s.http = &proxyproto.Listener{Listener: httpListener}
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9cee384

Please sign in to comment.