Skip to content

Commit

Permalink
rename metrics to adhere to naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Apr 5, 2021
1 parent 26f5509 commit 84acfa1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions p2p/transport/quic/tracer_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,71 +88,71 @@ func init() {

closedConns = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_closed_connections",
Name: "quic_connections_closed_total",
Help: "closed QUIC connection",
},
[]string{direction},
)
prometheus.MustRegister(closedConns)
newConns = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_new_connections",
Name: "quic_connections_new_total",
Help: "new QUIC connection",
},
[]string{direction, "handshake_successful"},
)
prometheus.MustRegister(newConns)
bytesTransferred = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_bytes_transferred",
Name: "quic_transferred_bytes",
Help: "QUIC bytes transferred",
},
[]string{direction}, // TODO: this is confusing. Other times, we use direction for the perspective
)
prometheus.MustRegister(bytesTransferred)
sentPackets = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_sent_packets",
Name: "quic_packets_sent_total",
Help: "QUIC packets sent",
},
[]string{encLevel},
)
prometheus.MustRegister(sentPackets)
rcvdPackets = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_rcvd_packets",
Name: "quic_packets_rcvd_total",
Help: "QUIC packets received",
},
[]string{encLevel},
)
prometheus.MustRegister(rcvdPackets)
bufferedPackets = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_buffered_packets",
Name: "quic_packets_buffered_total",
Help: "Buffered packets",
},
[]string{"packet_type"},
)
prometheus.MustRegister(bufferedPackets)
droppedPackets = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_dropped_packets",
Name: "quic_packets_dropped_total",
Help: "Dropped packets",
},
[]string{"packet_type", "reason"},
)
prometheus.MustRegister(droppedPackets)
connErrors = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_conn_errors",
Name: "quic_connection_errors_total",
Help: "QUIC connection errors",
},
[]string{"side", "error_code"},
)
prometheus.MustRegister(connErrors)
lostPackets = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "quic_lost_packets",
Name: "quic_packets_lost_total",
Help: "QUIC lost received",
},
[]string{encLevel, "reason"},
Expand Down

0 comments on commit 84acfa1

Please sign in to comment.