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

Metric tags #28

Open
levkk opened this issue Feb 14, 2022 · 3 comments
Open

Metric tags #28

levkk opened this issue Feb 14, 2022 · 3 comments

Comments

@levkk
Copy link

levkk commented Feb 14, 2022

Hey there,

Thank you for writing this, awesome project!

Curious, should there be support for tagging metrics? I could imagine something like this:

client.incr("some.metric", vec!["service:api"])

or maybe even better:

let client = Client::new("127.0.0.1:8125", "project", vec!["service:api"]).unwrap()

and this would add the tag service with value api to all metrics.

Thanks!

Edit: I think I was confused; tags seem to be a Datadog extension of StatsD, and it's not part of the StatsD spec.

@markstory
Copy link
Owner

I think I was confused; tags seem to be a Datadog extension of StatsD, and it's not part of the StatsD spec.

Yes, tags are a datadog extension. I think other statsd like servers support tags in a similar way though. I don't have much time to do the research, but if tags are implemented consistently by a few other statsd collectors/servers then I don't see a reason to not implement them here.

@minato128
Copy link

@levkk
This forked lib has constant tagging feature.
https://github.com/minato128/rust-dogstatsd

@levkk
Copy link
Author

levkk commented Feb 15, 2022

That's amazing, thank you for showing me that @minato128 .

@markstory Thank you! I think at this point it's clearly a Datadog extension of the protocol. That being said, Datadog is pretty popular so might be worth an optional setting or something similar.

All the best!

@levkk levkk closed this as completed Feb 15, 2022
@levkk levkk reopened this Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants