-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
Description
Question
I'd like to be able to add an attribute that may change throughout the lifetime of the app to all spans logged by the SDK. I'm using OpenTelemetry so I can add tags that are static and known at initialization time via OtelTracerProvider.Builder.addTag, but this doesn't work for attributes that either aren't static or aren't known at initialization time.
I looked into SpanEventMapper but very little of the SpanEvent object is mutable (only resource and name) and the SDK drops Spans if the mapper returns a new object instead of the one that was passed in.
Is there another approach to solving this problem? If not, would you consider making SpanEvent.Meta.additionalProperties a MutableMap or exposing a setter to add properties?