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

Question: is there any way to set tags? #92

Open
shengwu opened this issue Aug 26, 2017 · 6 comments
Open

Question: is there any way to set tags? #92

shengwu opened this issue Aug 26, 2017 · 6 comments
Labels

Comments

@shengwu
Copy link

shengwu commented Aug 26, 2017

We are planning to use elixometer to send metrics to datadog (with exometer_datadog). I know it's possible with some of datadog's libraries to set tags on metrics. For example, the my_app_api_endpoint metric could have a status_code tag to record what code the method returned, a method tag to record what the HTTP method was, and an endpoint tag to record the endpoint.

Is there a way to record tags when updating a metric, maybe with optional parameters in a call like update_spiral("metrics_test.\#{thingie}.qps", 1)? I looked through the source code, but it was not obvious whether this is supported.

@fishcakez
Copy link
Member

Hi @shengwu, unfortunately tags are not supported when updating a metric. However you would be able to do to this by using exometer_core directly and writing a :exometer_probe with a version of :exometer_slide that supports tagging values. While this may seem very complex, I do not think it would be as difficult as it sounds because exometer_core contains a few examples of how do this, and the hardest parts can be copied from the existing :exometer_spiral and :exometer_slide.

Note that this would lose you the automatic creation/subscribing of metrics and thepobox protection that elixometer provides to prevent overloading a :exometer_probe process. However again elixometer also exposes enough to replicate this feature if you require it.

@shengwu
Copy link
Author

shengwu commented Aug 26, 2017

@fishcakez Thank you for responding so quickly! Glad to hear that it's possible with exometer.

By chance, would elixometer be open to a contribution adding this feature?

@fishcakez
Copy link
Member

fishcakez commented Aug 27, 2017 via email

@zorbash
Copy link
Contributor

zorbash commented Sep 14, 2017

I have a fork zorbash/exometer@ac6197b which supports DataDog tags from configuration. I think that maybe exometer_report_statsd.erl can be changed to support dynamic (per metric update) tags.

@Kukunin
Copy link

Kukunin commented Feb 3, 2019

How would you express the goal to capture response time metrics along with status code with elixometer? Have a unique metric for each status code?

The information I would get is what response time is and how many and what errors are there?
Can I answer the second question with elixometer?

Thanks

@Kukunin
Copy link

Kukunin commented Feb 3, 2019

Actually, the exometer_influxdb reporter already supports a feature to convert a chunk of metric as a tag: travelping/exometer_influxdb#3

Someone might find this helpful, so I'm still posting the comment

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

No branches or pull requests

4 participants