mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2025-02-02 17:42:20 +00:00
fix udp metrics increment
Signed-off-by: kullanici0606 <yakup.turgut@btk.gov.tr>
This commit is contained in:
parent
ccb3eb6277
commit
b0c6d983e1
1 changed files with 1 additions and 1 deletions
|
@ -71,6 +71,7 @@ func (l *StatsDUDPListener) Listen() {
|
|||
}
|
||||
|
||||
func (l *StatsDUDPListener) EnqueueUdpPacket(packet []byte) {
|
||||
l.UDPPackets.Inc()
|
||||
packetCopy := make([]byte, len(packet))
|
||||
copy(packetCopy, packet)
|
||||
l.UdpPacketQueue <- packetCopy
|
||||
|
@ -84,7 +85,6 @@ func (l *StatsDUDPListener) ProcessUdpPacketQueue() {
|
|||
}
|
||||
|
||||
func (l *StatsDUDPListener) HandlePacket(packet []byte) {
|
||||
l.UDPPackets.Inc()
|
||||
lines := strings.Split(string(packet), "\n")
|
||||
for _, line := range lines {
|
||||
level.Debug(l.Logger).Log("msg", "Incoming line", "proto", "udp", "line", line)
|
||||
|
|
Loading…
Reference in a new issue