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
@mhalbritter so in Micrometer 1.0.x I fixed the bug in OTel and that got propagated forward.
However with Brave it works with 1.0.x if you add the separate tag setting handler, but it won't work with 1.1.x onwards. That's because we've aligned that the Brave's baggage should work like OTel one which means that it has a value only within the scope. The handler however is called after the span is finished so it's way after the baggage scope gets closed. So what I did is I added a constructor for BraveBaggageManager that requires to pass the list of tags to it (it's a non-breaking change cause the default constructor assumes that there are no tag keys) and whenever a baggage is created I will tag the span (instead of doing it at the end of span I do it at the beginning of baggage). That means that Boot will need to align here to change the way the BBM bean is being created.
The only potential problem I see is that someone creates a span but doesn't it put it in scope and wants to set a baggage on it, but baggage as such must live within a scope so I can't imagine someone creating a span not in scope and then a baggage in scope. If someone wants baggage they need to have a span in scope too 🤷
I have this code:
and
t1
configured as tag fields on theOtelBaggageManager
.While it creates the span, the
t1
tag is missing.If I add
to the try-with-resources, the tag appears.
The text was updated successfully, but these errors were encountered: