Skip to content

Commit

Permalink
Merge pull request #205 from libp2p/fix-version-negotiation-metrics
Browse files Browse the repository at this point in the history
correctly export version negotiation failures to Prometheus
  • Loading branch information
marten-seemann committed Apr 6, 2021
2 parents c69ab03 + 282be49 commit 4ccc8a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions p2p/transport/quic/tracer_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ func (m *metricsConnTracer) ClosedConnection(r logging.CloseReason) {
side = "remote"
desc = "stateless_reset"
}
if _, ok := r.VersionNegotiation(); ok {
desc = "version_negotiation"
}
if timeout, ok := r.Timeout(); ok {
switch timeout {
case logging.TimeoutReasonHandshake:
Expand Down

0 comments on commit 4ccc8a5

Please sign in to comment.