You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
becomes:
Otherwise you end up with confusing code like:
Where you are setting this attribute with a macro
set_attribute
in one line and having to set it manually incounter_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.
The text was updated successfully, but these errors were encountered: