You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue:
metric name: "db.cache.status:hit"
usage: s.datadogClient.Count("db.cache.status:hit", 1, nil, 1)
Above will fail on runtime with error: 2021-07-28 09:22:25 UTC | CORE | ERROR | (pkg/dogstatsd/server.go:422 in errLog) | Dogstatsd: error parsing metric message '"db.cache.status:hit:1|c|#env:production,service:some-service version:production--27a9a01"': could not parse dogstatsd metric value: strconv.ParseFloat: parsing "hit:1": invalid syntax
Reason:
forwarder logic calls this function
It separates the name from a value using ":" as a separator.
In my case, it will set the value = hit:1 which is wrong and while parsing to float64 it will fail.
Possible Solution:
We should have validation check on metric functions to reject such names or at least document them so other devs don't face such an issue.
Let me know if any other info is needed ✌️
The text was updated successfully, but these errors were encountered:
It does state that we should use only ASCII alphanumeric character
By document, we can have Godoc like ones so IntelliSense can expose such details.
solodynamo-dhero
changed the title
Provide clarity on non-acceptable metric name formats
Improve clarity on non-acceptable metric name formats
Aug 2, 2021
datadog-agent image version: datadog/cluster-agent:1.9.0
datadog-go version: v4.4.0
Issue:
metric name:
"db.cache.status:hit"
usage:
s.datadogClient.Count("db.cache.status:hit", 1, nil, 1)
Above will fail on runtime with error:
2021-07-28 09:22:25 UTC | CORE | ERROR | (pkg/dogstatsd/server.go:422 in errLog) | Dogstatsd: error parsing metric message '"db.cache.status:hit:1|c|#env:production,service:some-service version:production--27a9a01"': could not parse dogstatsd metric value: strconv.ParseFloat: parsing "hit:1": invalid syntax
Reason:
forwarder logic calls this function
It separates the name from a value using ":" as a separator.
In my case, it will set the value = hit:1 which is wrong and while parsing to float64 it will fail.
Possible Solution:
We should have validation check on metric functions to reject such names or at least document them so other devs don't face such an issue.
Let me know if any other info is needed ✌️
The text was updated successfully, but these errors were encountered: