java-dogstatsd-client
java-dogstatsd-client copied to clipboard
Sanitise invalid characters in metric names
resolves DataDog/java-dogstatsd-client#27
Hey @ben-healthforge Thanks for the contribution! Since the dogstatsd clients can typically see a high throughput of data points, one thing I want to be mindful of is any performance impact. Have you happened to see any performance difference before and after this change?
Are you currently experiencing metrics with a :
or invalid character not making it through to the Datadog Agent or are they not appearing in the UI?
Hi @nmuesch, we haven't noticed a performance impact at our level of usage but I suppose it could become significant as the number of metrics increases.
Metrics with a :
don't make it through the agent, they cause a parse error in dogstatsd (which is understandable given that the protocol uses :
as a separator).
Thanks for the info and context. I'll try to take a look to see if there is some performance impact here, if noticeable we may want to put this behind some configuration option if possible.
According to https://docs.datadoghq.com/developers/faq/what-best-practices-are-recommended-for-naming-metrics-and-tags/ this sanitization is already supposed to happen, or am I misreading it?