-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network/discovery: rate limit skipped peers log #1803
base: stage
Are you sure you want to change the base?
Conversation
network/discovery/metrics.go
Outdated
metricSkippedPeers = promauto.NewCounterVec(prometheus.CounterOpts{ | ||
Name: "ssv:network:discovery:skipped_peers", | ||
Help: "Counts skipped peers", | ||
}, []string{"enr", "peer_id", "err"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having peer ID or an ENR as a label is problematic because of its high cardinality (Prometheus struggles with this). We could use something such as ssv:network:discovery:skipped_peers_total
for now if a total count would help. If not, we need some other solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zktaiga reverted the change and added the log rate limit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should reduce logs but also not miss unique logs. good job
this looks good, but the map will never clean and may grow infinitely instead of implementing cleanup, i suggest just using https://github.com/jellydator/ttlcache instead (because we already import it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean the cache, maybe use some existing ttl cache like @moshe-blox suggested
@y0sher @moshe-blox I heard from @zktaiga we decided not to proceed with this solution, so can I close this? |
@zktaiga reported that this log makes up to 40% of stage logs