opencensus-erlang
opencensus-erlang copied to clipboard
Merge metrics tags before passing them to the handler
Currently almost all metric handlers need to do something like:
maps:merge(CTags, maps:from_list(lists:zip(Tags, TagsV)))
Which is little bit PITA. What I am proposing is to do it for them in the oc_stats:export/0
and return data with above "merging" function already done. This should reduce hurdle in defining metrics handlers and should unbound them from the internal storage of data in the application.
Alternatively use opencensus_service
and provide list of tag names and list of tag values and skip CTags
, just split them before and join it with Tags
and TagsV
beforehand.