Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

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 authored Apr 6, 2021
2 parents 8e16d7c + ec00d26 commit dbc13b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 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 dbc13b8

Please sign in to comment.