-
Notifications
You must be signed in to change notification settings - Fork 40.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TracingProperties exposes package-private PropagationType from public methods #39265
TracingProperties exposes package-private PropagationType from public methods #39265
Conversation
@vj-atlassian Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@vj-atlassian Thank you for signing the Contributor License Agreement! |
We don't really consider the Java API of the configuration properties classes to be public API. Can you please describe what you're doing with |
Sure. So we have our own customisation over Spring Boot provided tracing, where we support both W3C and B3 context propagation simultaneously. While Spring Boot doesn't support multiple tracing propagators but we do and have a code something like: for (String propType : propagationTypes) {
switch (propType.toUpperCase()) {
case "W3C" -> propagators.add(...);
case "B3" -> propagators.add(...);
default -> {}
}
} where As per the Java API, I see that almost every other class is accessible publicly in Let me know if that helps! |
I think in this case it's an oversight that |
Flagging to see if others in the team agree. |
Fine by me. The current part public, part package-private arrangement isn't ideal. More broadly, I do wonder if we should change our policy about |
The PropagationType enum is returned from public methods so should be public itself. See gh-39265
Thanks very much @vj-atlassian, this has now been merged into 3.1.x and forward. |
PropagationType enum is non-public outside of TracingProperties class which makes it unusable. I would request you to make it accessible so that we can access it to make customisation in tracing needs within our services.