opencensus-erlang icon indicating copy to clipboard operation
opencensus-erlang copied to clipboard

Merge metrics tags before passing them to the handler

Open hauleth opened this issue 6 years ago • 1 comments

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.

hauleth avatar Feb 13 '19 15:02 hauleth

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.

hauleth avatar Feb 13 '19 16:02 hauleth