CAMEL-23312: Add SpanKind support to OpenTelemetry2 component#22612
CAMEL-23312: Add SpanKind support to OpenTelemetry2 component#22612JiriOndrusek wants to merge 1 commit intoapache:mainfrom
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
All tested modules (8 modules)
|
squakez
left a comment
There was a problem hiding this comment.
Hello, thanks again for the work but it appears to be quite far from what I was proposing.
The change I'm advocating for are quite simple and compliant with the actual design. What I think you need to do is to change the implementation of the dedicated beforeTracingEvent(Span span, Exchange exchange, Endpoint endpoint) for those decorators (messaging and http based) which you want to add a kind. For example:
Here you need to add a tag to the existing Span object, i.e. span.setTag("kind", "my-kind"). The method gives you everything you need to perform the action. If you need the Op type, you can extend both the before and after tracing with such an object. In this way it will be available for any type evaluation inside that method.
Hope it helps.
|
Alternatively we could even think to expose the "kind" in the Span (ie, |
8bb48b3 to
ca4f652
Compare
|
Hi @squakez, I've tried to follow your hints. |
ca4f652 to
e63520b
Compare
| this.baggage = baggage.toBuilder().put(BAGGAGE_CAMEL_FLAG, "true").build(); | ||
| // For deferred span creation | ||
| private SpanBuilder spanBuilder; | ||
| private final Map<String, String> pendingTags = new HashMap<>(); |
There was a problem hiding this comment.
should these map/list be concurrent variants in case multi threads calls at the same time
There was a problem hiding this comment.
I discussed the changes with @squakez and I'll open the new PR which does not need all this code for defferring span creation
|
superseded by #22653 |
fixes https://issues.apache.org/jira/browse/CAMEL-23312
superseeds #22577
semantics
CLIENT/SERVER and messaging components using PRODUCER/CONSUMER
behavior and decorator property inheritance
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.