chore(components): specify custom span nesting in opentelemetry#23120
Conversation
|
@davsclaus @oscerd I need you to please have a look at this one. Please, advise if the documentation explaining the design constraint is wrong or should be reworded. Also, I wonder if this analysis is overlooking something. I understand that when we configure, for example, a bean to be called as an endpoint, then, the execution "converts" it as an event. Is there any possibility to have it as a regular processor and make the otel component to intercept it in the "InterceptStrategy" instead? Thanks! |
|
🌟 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 (12 modules)
|
oscerd
left a comment
There was a problem hiding this comment.
It looks ok to me and it doesn't need to be reworded.
gnodet
left a comment
There was a problem hiding this comment.
Thanks for documenting this architectural constraint, @squakez — this is a genuinely useful addition that will save users from confusing debugging sessions when custom spans don't nest where expected.
A couple of items to address:
Required:
- Remove
System.out.printlndebug output in the otel2 test - Add missing
beanTo.hasEnded()assertion in the otel2 test
Suggestions (non-blocking):
3. The telemetry test route has an extra .process(...) step not present in the otel2 test — consider aligning for easier cross-module comparison
4. The two tests assert different parent hierarchies for beanMethod — a clarifying comment in the telemetry test would help future readers
See inline comments for details.
Note: this is a project-conventions review and does not replace specialized tools like CodeRabbit, Sourcery, or SonarCloud.
Claude Code on behalf of Guillaume Nodet
As we have moved the scope only for Processors, any call to the endpoint, which generates an event is not providing the scope. This is needed by custom span to nest the execution under the specific processor. Added some test and documentation to clarify this architecture constraint.
374ca52 to
2c98d23
Compare
As we have moved the scope only for Processors, any call to the endpoint, which generates an event is not providing the scope. This is needed by custom span to nest the execution under the specific processor. Added some test and documentation to clarify this architecture constraint.
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.