go-libp2p icon indicating copy to clipboard operation
go-libp2p copied to clipboard

quic: make metrics collection independent of Prometheus' scrape frequency

Open marten-seemann opened this issue 4 years ago • 2 comments

Looping over the connections on a fixed interval would make the data returned to Prometheus independent of its scrape interval and the amount of Prometheus instances. E.g. if you have 3 Prometheus instances for high availability, you would be looping over the connections 3 times every scrape interval (e.g. minute). Instead, if you collect on a fixed interval (e.g. 1 minute) you would only loop over all collections once per minute, instead of 3 times per minute.

I think it is fine either way.

Originally posted by @mxinden in https://github.com/libp2p/go-libp2p-quic-transport/pull/200#discussion_r606964540

marten-seemann avatar Apr 05 '21 11:04 marten-seemann

Open question: Is there any way to find out Prometheus' scrape frequency, so we can adjust our collection interval?

marten-seemann avatar Apr 05 '21 12:04 marten-seemann

Open question: Is there any way to find out Prometheus' scrape frequency, so we can adjust our collection interval?

Not that I am aware of, other than guessing it based on previous scrapes, though I would consider that a hack.

mxinden avatar Apr 05 '21 12:04 mxinden