Skip to content

Commit

Permalink
fix(metrics.go): remove "key" label from RatelimitPushPullEvents and
Browse files Browse the repository at this point in the history
RatelimitPushPullLatency histograms
fix(sync_with_origin.go): remove "key" label from prometheus labels in
syncWithOrigin function
  • Loading branch information
chronark committed Aug 6, 2024
1 parent 36e988a commit 1112399
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/agent/pkg/prometheus/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ var (
Namespace: "agent",
Subsystem: "ratelimit",
Name: "pushpull_events",
}, []string{"nodeId", "key", "peerId"})
}, []string{"nodeId", "peerId"})
RatelimitPushPullLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{
Namespace: "agent",
Subsystem: "ratelimit",
Name: "pushpull_latency",
Help: "Latency of push/pull events in seconds",
}, []string{"nodeId", "key", "peerId"})
}, []string{"nodeId", "peerId"})
)
1 change: 0 additions & 1 deletion apps/agent/services/ratelimit/sync_with_origin.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func (s *service) syncWithOrigin(req syncWithOriginRequest) {
labels := map[string]string{
"nodeId": s.cluster.NodeId(),
"peerId": peer.Id,
"key": req.key,
}
prometheus.RatelimitPushPullEvents.With(labels).Add(float64(len(req.events)))

Expand Down

0 comments on commit 1112399

Please sign in to comment.