capture code.stacktrace and mutable spans #10973
-
Hi, We currently have a feature in our OTel agent distribution that allows to capture the There are however a few implementation details that make this challenging:
In order to do this, we need to have a way to get a mutable span (MutableSpan.java) that allows to add extra attributes. One of the reasons the SDK does not provide mutable spans is that the order of the span processors can't be guaranteed (see comment) and so combining multiple span processors can produce unexpected results based on their registration order. To remove this limitation and allow proper usage or mutable spans, we also had to introduce an explicit way to order the span processors through a "processor chain" that is similar to the servlet filter chains. The implementation can be found in AbstractSimpleChainingSpanProcessor.java and it even supports autoconfiguration. We plan to contribute in a few steps:
The questions are the following:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Contributed in open-telemetry/opentelemetry-java-contrib#1255 with using a chaining span processor while waiting for a better solution with changes in the SDK. |
Beta Was this translation helpful? Give feedback.
Contributed in open-telemetry/opentelemetry-java-contrib#1255 with using a chaining span processor while waiting for a better solution with changes in the SDK.