Made Baggage mutable, to allow for extension.#23450
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 (9 modules)
|
squakez
left a comment
There was a problem hiding this comment.
Sorry, we must decline it. This is against the design of the Span adapter that is meant to be immutable. We could break consistency in async Camel core logic processing if we let the final user to mess it up with the telemetry logic. The telemetry logic MUST be exclusive scope of core and we are limiting that with clear design decisions.
If you need something different of what it is proposed by the framework, I suggest to avoid using it at all and, instead, develop something specific to your used case. Camel is a large and complex framework and there are different ways to manage some specific problem, customization included.
|
Ok, no problem. We can live with the sub-route workaround. Thanks anyway! |
Description
Made Baggage mutable, i.e. non-private and with a setter.
This allows for extending the Baggage with additional entries, which may be valuable for low-level programmatic baggage management when the generic solution (https://camel.apache.org/components/next/others/opentelemetry2.html#_baggage_customization) isn't sufficient.
For more details, see discussion in https://issues.apache.org/jira/projects/CAMEL/issues/CAMEL-23349
Target
mainbranch)Tracking
Apache Camel coding standards and style
I checked that each commit in the pull request has a meaningful subject line and body.
I have run
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.