If multiple simultaneous calls to a freshly registered Counter are made with the Telegraf flavour of StatsDRegistry, common tags can go missing on these and all subsequent publications.

Discovered when investigating why only the highest volume of our shipped metric series appeared to be missing common tags, and why only sometimes - enough restarts would restore the common tags for the affected series.

Wrapping the Counter's .increment() in a Mutex has been an effective work-around, but unnecessary for any invocation but the first. The additional overhead is obviously not ideal!

0 Answers