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

supplying units/metric metadata #33

Open
d1manson opened this issue Nov 9, 2017 · 3 comments
Open

supplying units/metric metadata #33

d1manson opened this issue Nov 9, 2017 · 3 comments

Comments

@d1manson
Copy link

d1manson commented Nov 9, 2017

I know you can change set metric metadata in the main datadog interface - as explained here, and there is a way of doing it with an api, but is there any way/plans to expose it in this module?

An optional argument to histogram (and friends) would be ideal..you could cache the last metadata values and only send them if there is a change?

@csabapalfi
Copy link
Collaborator

Sounds like a great addition to the module. Would you be interested in contributing this in a PR? 😄

@d1manson
Copy link
Author

d1manson commented Nov 9, 2017

perhaps..we shall see!

@Mr0grog
Copy link
Collaborator

Mr0grog commented Sep 27, 2022

Noting for future reference: this comes with similar caveats as #81. The docs indicate that setting units as part of metric submission is only in the v2 API, which formats things differently, has shorter limits on metric names, and a smaller maximum payload size. There’s likely to be a fair amount that would have to change under the hood to make this work (which doesn’t mean it shouldn’t be done or isn’t worthwhile!).

Another oddity is that the v2 lets you set the unit, but not the per_unit, so it only goes halfway to matching what you can configure in Datadog’s UI.

(One alternative here might be some mechanism that uses the edit metric metadata endpoint, but that would only work if someone includes an appKey in addition to their apiKey, and increases potential security risks for users to consider. It’s probably not a good approach.)

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