Made dogstatsd tag check consistent with previous logic

Signed-off-by: Greg Chambers <gregory.w.chambers@gmail.com>
This commit is contained in:
Greg Chambers 2024-06-02 13:42:16 -07:00
parent 7b4f7310ae
commit ba68944bec

View file

@ -217,7 +217,7 @@ func (p *Parser) LineToEvents(line string, sampleErrors prometheus.CounterVec, s
labels := map[string]string{} labels := map[string]string{}
metric := p.parseNameAndTags(elements[0], labels, tagErrors, logger) metric := p.parseNameAndTags(elements[0], labels, tagErrors, logger)
usingDogStatsDTags := strings.Contains(line, "|#") usingDogStatsDTags := strings.Contains(elements[1], "|#")
if usingDogStatsDTags && len(labels) > 0 { if usingDogStatsDTags && len(labels) > 0 {
// using DogStatsD tags // using DogStatsD tags