java-dogstatsd-client icon indicating copy to clipboard operation
java-dogstatsd-client copied to clipboard

Sanitise invalid characters in metric names

Open ben-healthforge opened this issue 6 years ago • 4 comments

resolves DataDog/java-dogstatsd-client#27

ben-healthforge avatar Sep 10 '18 14:09 ben-healthforge

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?

nmuesch avatar Sep 30 '18 20:09 nmuesch

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).

ben-healthforge avatar Oct 01 '18 12:10 ben-healthforge

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.

nmuesch avatar Oct 01 '18 14:10 nmuesch

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?

rud avatar Nov 06 '18 08:11 rud