Open
Description
With metrics hopefully moving to stable soon after I write the docs I'm working on now I think we need to introduce new macros (keeping the old to not break existing code). For example:
?set_attribute(Key, Value)
becomes:
?span_set_attribute(Key, Value)
Otherwise you end up with confusing code like:
do_roll() ->
?with_span(dice_roll, #{},
fun(_) ->
Roll = rand:uniform(6),
?set_attribute('roll.value', Roll),
?counter_add(?ROLL_COUNTER, 1, #{'roll.value' => Roll}),
Roll
end).
Where you are setting this attribute with a macro set_attribute
in one line and having to set it manually in counter_add
in the next.
There is no such thing as context attributes (yet) so to be clear we are only setting it on the span we should add these new macros and update all docs/examples to use them.
Metadata
Metadata
Assignees
Labels
No labels