Skip to content

Commit

Permalink
drop Prometheus metrics handler
Browse files Browse the repository at this point in the history
  • Loading branch information
laocheng.cheng committed Oct 12, 2021
1 parent c8b2053 commit 62dd3f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/grpc/setup_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"net"
"net/http"
"os"
"time"

Expand All @@ -26,7 +25,6 @@ import (
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
monitor "github.com/hypnoglow/go-pg-monitor"
"github.com/hypnoglow/go-pg-monitor/gopgv9"
"github.com/prometheus/client_golang/prometheus/promhttp"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/health"
Expand Down Expand Up @@ -133,6 +131,7 @@ func (s *GrpcServer) GrpcServer(port string, dbURLs map[string]string, rdURL str
grpc_prometheus.Register(s.server)
grpc_prometheus.EnableHandlingTimeHistogram()

/*
go func() {
// Register Prometheus metrics handler.
http.Handle("/metrics", promhttp.Handler())
Expand All @@ -143,6 +142,7 @@ func (s *GrpcServer) GrpcServer(port string, dbURLs map[string]string, rdURL str
log.Panic("Prometheus listening server is shutting down", zap.Error(err))
}
}()
*/

// GRPC entry point
log.Info("Starting to accept connections", zap.String("service", s.serverName))
Expand Down

0 comments on commit 62dd3f6

Please sign in to comment.