-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Push metric name sanitization to backends #110
Comments
I think this is a good idea. I'd love to see more code pushed into the backends, where it makes sense. |
what's the status of this? histogram support (#162) suffers from keys like 'bin_0.5' not being sanitized to 'bin_0_5' (or whatever) |
Closing this, since we'll pull #155 after the config flag is added. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Opening this as a general RFC.
Currently the main StatsD daemon performs a set of regex replacements to sanitize metric names:
These regular expressions are largely based on the acceptable name formats that Graphite (being the only backend) was able to handle. Now that we have a pluggable backend system, I'm proposing that we make this task a function of each backend to handle as is appropriate for its acceptable metric name character set.
One advantage of pushing this down to the backend level would be that different backends could handle the special characters as optional control sequences. For example, in the case of the Librato backend we would like a way to specify a custom source parameter on a stat by stat basis. One thought would be to use a prefix character, like (/), to separate the source name from the metric name:
The Librato backend would split the source out based on the (/) character, while backends like Graphite would simply turn that into a metric named "db1.acme.com.gorets", like it does today.
The text was updated successfully, but these errors were encountered: