Avoid NPE when DirectWithAttributesChannel class is not available
Resolves
MODIFY
instrumentation/spring/spring-integration-4.1/library/src/main/java/io/opentelemetry/instrumentation/spring/integration/TracingChannelInterceptor.java
instrumentation/spring/spring-integration-4.1/library/src/main/java/io/opentelemetry/instrumentation/spring/integration/TracingChannelInterceptor.java
@@ -230,7 +230,7 @@ final class TracingChannelInterceptor implements ExecutorChannelInterceptor {
}
private boolean createProducerSpan(MessageChannel messageChannel) {
- if (!producerSpanEnabled) {
+ if (!producerSpanEnabled || directWithAttributesChannelClass == null) {
return false;
}

Avoid NPE when DirectWithAttributesChannel class is not available (#7133)

Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7123