brightcove / hot-shots

Node.js client for statsd, DogStatsD, and Telegraf
MIT License
527 stars 135 forks source link

Dogstatsd: error parsing metric message #258

Open GeoffreyPlitt opened 1 year ago

GeoffreyPlitt commented 1 year ago

I think this library is sending data that the agent cannot parse.

My code does: dogStatsD.increment('my_temp', tags) where tags is a JS object of keys/values.

The function call to hot-shots seems to work fine.

But the dogstatsd logs show the following error:

2023-08-15 16:09:53 PDT | CORE | ERROR | (comp/core/log/logger.go:100 in Errorf) | Dogstatsd: error parsing metric message '"my_temp:env:GalaxyDev,version:19.2.0-dev,service:myservice-api,namespace:undefined,cluster:undefined|c"': could not parse dogstatsd metric values: strconv.ParseFloat: parsing "env": invalid syntax

The first problem is, I don't understand what's wrong, can't tag values be strings? But the bigger problem is, shouldn't this error be caught by hot-shots before it attempts to send the data?

GeoffreyPlitt commented 1 year ago

I've tried 3 types for tags:

All of them lead to parsing errors showing in the dogstatsd logs.

Is there an example of how to send tags successfully?

anri-asaturov commented 1 year ago

Having same issues, the metric is sent but some of the tags are skipped.

bdeitte commented 2 months ago

There's been no changes here for awhile in the basic structure of the calls, and there's some good unit tests in place to ensure this. So I am guessing this isn't based on the hot-shots version. Did DogStatsD change something, is this dependent on the version there? Is everyone using this now have this problem? I'm not using that agent so unfortunately I can't answer these questions.