forked from mirrors/statsd_exporter
Remove unintended changes
This commit is contained in:
parent
bb4e42068f
commit
1fbc392800
1 changed files with 2 additions and 2 deletions
|
@ -351,6 +351,7 @@ func (l *StatsDListener) handlePacket(packet []byte, e chan<- Events) {
|
||||||
if line == "" {
|
if line == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
elements := strings.SplitN(line, ":", 2)
|
elements := strings.SplitN(line, ":", 2)
|
||||||
if len(elements) < 2 || len(elements[0]) == 0 || !utf8.ValidString(line) {
|
if len(elements) < 2 || len(elements[0]) == 0 || !utf8.ValidString(line) {
|
||||||
networkStats.WithLabelValues("malformed_line").Inc()
|
networkStats.WithLabelValues("malformed_line").Inc()
|
||||||
|
@ -365,8 +366,7 @@ func (l *StatsDListener) handlePacket(packet []byte, e chan<- Events) {
|
||||||
} else {
|
} else {
|
||||||
samples = strings.Split(elements[1], ":")
|
samples = strings.Split(elements[1], ":")
|
||||||
}
|
}
|
||||||
samples:
|
samples: for _, sample := range samples {
|
||||||
for _, sample := range samples {
|
|
||||||
components := strings.Split(sample, "|")
|
components := strings.Split(sample, "|")
|
||||||
samplingFactor := 1.0
|
samplingFactor := 1.0
|
||||||
if len(components) < 2 || len(components) > 4 {
|
if len(components) < 2 || len(components) > 4 {
|
||||||
|
|
Loading…
Reference in a new issue