add metrics for the udp sockets using SO_MEMINFO (#390)

Retrieve the current socket stats using SO_MEMINFO and report them as
metrics gauges. If SO_MEMINFO isn't supported, we don't report these metrics.
This commit is contained in:
Wade Simmons
2021-03-01 19:51:33 -05:00
committed by GitHub
parent ecfb40f29c
commit d232ccbfab
3 changed files with 69 additions and 0 deletions

View File

@ -96,6 +96,11 @@ func (u *udpConn) reloadConfig(c *Config) {
// TODO
}
func NewUDPStatsEmitter(udpConns []*udpConn) func() {
// No UDP stats for non-linux
return func() {}
}
type rawMessage struct {
Len uint32
}