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

Get metric value by wildcard key #89

Closed
chvanikoff opened this issue Aug 10, 2017 · 1 comment · Fixed by #97
Closed

Get metric value by wildcard key #89

chvanikoff opened this issue Aug 10, 2017 · 1 comment · Fixed by #97

Comments

@chvanikoff
Copy link

Let's say we have metrics app.dev.spirals.registered.user.us and app.dev.spirals.registered.user.ca - correct me if I'm wrong, but as of now there's no way to get accumulated value for app.dev.spirals.registered.user._ with Elixometer. It is possible to either introduce a new key like app.dev.spirals.registered.user.total or use :exometer.get_values/1 function, which allows wildcards, directly (:exometer.get_values([:app, :dev, :spirals, :registered, :user, :_]). Both are possible to go with, however I think it would be best to implement call to Exometer.get_values/1 via Elixometer to simplify dealing with keys (which should be list of atoms for Exometer) and results parsing (which is a list of all results found for wildcard).

@fishcakez
Copy link
Member

Hi @chvanikoff, it seems like a good suggestion because elixometer handles prefixing the exometer metric name and uses a single string ("foo.bar.buzz") that is converted to a list in exometer: ["elixometer", "dev", "foo", "bar", "buzz"].

Note that exometer supports a list of atoms, integers, chardatas and/or strings, not just atoms. Elixometer uses a list of strings so you would use: :exometer.get_values(["app", "dev", "spirals", "registered", "user" :_]) to get those values.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants