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

Dogstatsd: error parsing metric message #258

Open
GeoffreyPlitt opened this issue Aug 15, 2023 · 3 comments
Open

Dogstatsd: error parsing metric message #258

GeoffreyPlitt opened this issue Aug 15, 2023 · 3 comments

Comments

@GeoffreyPlitt
Copy link

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
Copy link
Author

I've tried 3 types for tags:

  • Basic JS object with string key/vals
  • Array of strings in key:val format
  • JSON-stringified version of basic JS object with string key/vals

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

Is there an example of how to send tags successfully?

@anri-asaturov
Copy link

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

@bdeitte
Copy link
Collaborator

bdeitte commented Sep 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants