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.

Comment From: pivotal-cla

@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.

Comment From: pivotal-cla

@vj-atlassian Thank you for signing the Contributor License Agreement!

Comment From: wilkinsona

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 TracingProperties?

Comment From: vj-atlassian

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 propogationTypes refers to the spring boot property - management.tracing.propagation.type. Now, since the API is not available/public, I had to hardcode strings (W3C, B3) unnecessarily or the other option is duplicate the enum in my code (which didn't make sense IMO).

As per the Java API, I see that almost every other class is accessible publicly in TracingProperties but just the TracingProperties.Propagation.PropagationType. Not sure if that was intentional though.

Let me know if that helps!

Comment From: philwebb

I think in this case it's an oversight that PropagationType isn't public. It's returned from the public Propagation.getEffectiveConsumedTypes() method so in my opinion either everything should be package-private or the enum should be public.

Comment From: philwebb

Flagging to see if others in the team agree.

Comment From: wilkinsona

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 @ConfigurationProperties classes. While we document that they're not really public API they are, in Java terms, public API so it's almost inevitable that people will use them. We even encourage some usage ourselves.

Comment From: philwebb

Thanks very much @vj-atlassian, this has now been merged into 3.1.x and forward.