Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[inputs.statsd] Tags mangled with tags from other StatsD metrics #8695

Closed
gnjack opened this issue Jan 14, 2021 · 1 comment · Fixed by #8885
Closed

[inputs.statsd] Tags mangled with tags from other StatsD metrics #8695

gnjack opened this issue Jan 14, 2021 · 1 comment · Fixed by #8885
Assignees
Labels
area/statsd bug unexpected problem or unintended behavior

Comments

@gnjack
Copy link
Contributor

gnjack commented Jan 14, 2021

After upgrading from Telegraf 1.16.3 to 1.17.0, we've noticed that tags from StatsD metrics are being mangled with unrelated metrics.

Relevant telegraf.conf:

This may require Graphite templates to be set on the statsd input as the thread safe issue appears to be partially in the GraphiteParser

[[inputs.statsd]]
  templates = ["example.* measurement.host"]

Steps to reproduce:

  1. Configure a StatsD input
  2. Send a large number of metrics with Influx StatsD style tags (issue is worse at high concurrency when reading StatsD input). For example, send these two metrics a large number of times:
test,a=b:1|c
foobar,foo=bar:1|c

Expected behavior:

Something similar to these two metrics are written to the output:

test,a=b count=100
foobar,foo=bar count=100

Actual behavior:

Something similar to these metrics are written to the output, where sometimes the tags are swapped:

test,a=b count=93
test,foo=bar count=7
foobar,foo=bar count=89
foobar,a=b count=11

Additional info:

Appears to be caused by a locking change in #8509, as I attempted to explain here #8509 (comment)

@ivorybilled
Copy link
Contributor

I was able to replicate this, it's definitely caused by the cause you identified and take a look at the above PR if you'd like. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/statsd bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants