-
Notifications
You must be signed in to change notification settings - Fork 34
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
Augmenting telemetry metrics metadata with process information #28
Comments
Do you mean adding it to the set of avaialble tags, i.e. merging it with event metadata? |
Yes, something like `logger_tags` maybe?
--
*José Valimwww.plataformatec.com.br
<http://www.plataformatec.com.br/>Founder and Director of R&D*
|
I'm only wondering what happens if the same key is found in both event metadata and logger_tags - which one should tak precedence? IMO logger_tags should override metadata, because if we want to rely on the procdict, we usually also control it, so we can always rename the key so that there are no conflicts. |
Agreed. But yeah, I would wait a bit until we unify logging metadata in the
Elixir front too.
--
*José Valimwww.plataformatec.com.br
<http://www.plataformatec.com.br/>Founder and Director of R&D*
|
Hm, I've considered using logger metadata for opencensus tags, maybe we should. I think the main reason to not was that span context doesn't fit well in logger metadata. We set logger metadata for each span context but formatted to what you'd expect in logs, not the actual span context record which has integers not strings. So we are messing with the pdict anyway. But for tags it may make sense to just use logger metadata, especially if telemetry_metrics will want to grab from there. |
Sometimes people may want to send their metrics based on some parameter that is external to the metric. For example, multi-tenant applications may want to segregate their data in someway.
Generally speaking, the way to do this is by attaching some metadata in the process dictionary. We could do our own book keeping on telemetry but maybe the simplest approach is to have something like
:logger_metadata
that retrieves the data from Erlang's logger and automatically adds it to the metric?I am not sure this is the best way to go (especially because it is not decided yet if Elixir will merge its metadata with Erlang's) but I thought I would open this up for discussion.
The text was updated successfully, but these errors were encountered: