Add a metric to display pruning of the node's peer
This commit is contained in:
parent
537d31416e
commit
60ee56a23e
@ -116,6 +116,7 @@ var (
|
|||||||
PubsubDeliverMessage = stats.Int64("pubsub/delivered", "Counter for total delivered messages", stats.UnitDimensionless)
|
PubsubDeliverMessage = stats.Int64("pubsub/delivered", "Counter for total delivered messages", stats.UnitDimensionless)
|
||||||
PubsubRejectMessage = stats.Int64("pubsub/rejected", "Counter for total rejected messages", stats.UnitDimensionless)
|
PubsubRejectMessage = stats.Int64("pubsub/rejected", "Counter for total rejected messages", stats.UnitDimensionless)
|
||||||
PubsubDuplicateMessage = stats.Int64("pubsub/duplicate", "Counter for total duplicate messages", stats.UnitDimensionless)
|
PubsubDuplicateMessage = stats.Int64("pubsub/duplicate", "Counter for total duplicate messages", stats.UnitDimensionless)
|
||||||
|
PubsubPruneMessage = stats.Int64("pubsub/prune", "Counter for total prune messages", stats.UnitDimensionless)
|
||||||
PubsubRecvRPC = stats.Int64("pubsub/recv_rpc", "Counter for total received RPCs", stats.UnitDimensionless)
|
PubsubRecvRPC = stats.Int64("pubsub/recv_rpc", "Counter for total received RPCs", stats.UnitDimensionless)
|
||||||
PubsubSendRPC = stats.Int64("pubsub/send_rpc", "Counter for total sent RPCs", stats.UnitDimensionless)
|
PubsubSendRPC = stats.Int64("pubsub/send_rpc", "Counter for total sent RPCs", stats.UnitDimensionless)
|
||||||
PubsubDropRPC = stats.Int64("pubsub/drop_rpc", "Counter for total dropped RPCs", stats.UnitDimensionless)
|
PubsubDropRPC = stats.Int64("pubsub/drop_rpc", "Counter for total dropped RPCs", stats.UnitDimensionless)
|
||||||
@ -326,6 +327,10 @@ var (
|
|||||||
Measure: PubsubDuplicateMessage,
|
Measure: PubsubDuplicateMessage,
|
||||||
Aggregation: view.Count(),
|
Aggregation: view.Count(),
|
||||||
}
|
}
|
||||||
|
PubsubPruneMessageView = &view.View{
|
||||||
|
Measure: PubsubPruneMessage,
|
||||||
|
Aggregation: view.Count(),
|
||||||
|
}
|
||||||
PubsubRecvRPCView = &view.View{
|
PubsubRecvRPCView = &view.View{
|
||||||
Measure: PubsubRecvRPC,
|
Measure: PubsubRecvRPC,
|
||||||
Aggregation: view.Count(),
|
Aggregation: view.Count(),
|
||||||
|
@ -559,6 +559,7 @@ func (trw *tracerWrapper) Trace(evt *pubsub_pb.TraceEvent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case pubsub_pb.TraceEvent_PRUNE:
|
case pubsub_pb.TraceEvent_PRUNE:
|
||||||
|
stats.Record(context.TODO(), metrics.PubsubPruneMessage.M(1))
|
||||||
if trw.traceMessage(evt.GetPrune().GetTopic()) {
|
if trw.traceMessage(evt.GetPrune().GetTopic()) {
|
||||||
if trw.lp2pTracer != nil {
|
if trw.lp2pTracer != nil {
|
||||||
trw.lp2pTracer.Trace(evt)
|
trw.lp2pTracer.Trace(evt)
|
||||||
|
Loading…
Reference in New Issue
Block a user