Skip to content

Commit

Permalink
Remove the incoming_connection_timestamp metric (#965)
Browse files Browse the repository at this point in the history
* Remove the incoming_connection_timestamp metric
  • Loading branch information
mcamou committed Apr 20, 2022
1 parent 6252dd5 commit a91d722
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 43 deletions.
9 changes: 0 additions & 9 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,6 @@ var (
Help: "1 for drand nodes, not emitted for relays",
})

// IncomingConnectionTimestamp (Group) timestamp when each incoming connection was established
// We cannot track the actual connection state as with outgoing connections, since grpc-go
// doesn't allow for adding a listener for state tracking.
IncomingConnectionTimestamp = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "incoming_connection_timestamp",
Help: "timestamp when an incoming connection was established",
}, []string{"remote_host"})

// OutgoingConnectionState (Group) tracks the state of an outgoing connection, according to
// https://github.com/grpc/grpc-go/blob/master/connectivity/connectivity.go#L51
// Due to the fact that grpc-go doesn't support adding a listener for state tracking, this is
Expand Down Expand Up @@ -249,7 +241,6 @@ func bindMetrics() error {
drandBuildTime,
dkgStateChangeTimestamp,
reshareStateChangeTimestamp,
IncomingConnectionTimestamp,
OutgoingConnectionState,
}
for _, c := range group {
Expand Down
2 changes: 1 addition & 1 deletion net/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewGRPCListenerForPrivate(
opts = append(opts,
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(grpc_prometheus.StreamServerInterceptor, s.NodeVersionStreamValidator)),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(grpc_prometheus.UnaryServerInterceptor, s.NodeVersionValidator)),
grpc.StatsHandler(IncomingConnectionsStatsHandler))
)

grpcServer := grpc.NewServer(opts...)

Expand Down
33 changes: 0 additions & 33 deletions net/metrics.go

This file was deleted.

0 comments on commit a91d722

Please sign in to comment.