In the current implementation of StreamBridge, when a message is published to a dynamic destination, the following code creates a local messageChannel:
https://github.com/spring-cloud/spring-cloud-stream/blob/main/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/StreamBridge.java#L291-L293
messageChannel = this.isAsync() ? new ExecutorChannel(this.executorService) : new DirectWithAttributesChannel();
((AbstractSubscribableChannel) messageChannel).setApplicationContext(applicationContext);
((AbstractSubscribableChannel) messageChannel).setComponentName(destinationName);
However, this messageChannel does not have an ObservationRegistry registered with it. As a result, the messages sent through this dynamically created channel are published without observability support, which means tracing is missing.
Expected Behavior:
Ideally, StreamBridge should ensure that any dynamically created messageChannel is configured with an ObservationRegistry, enabling observability features for all messages published through these channels.
Reference:
https://github.com/spring-projects/spring-integration/blob/main/spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationManagementConfigurer.java#L205-L218
In the current implementation of StreamBridge, when a message is published to a dynamic destination, the following code creates a local messageChannel:
https://github.com/spring-cloud/spring-cloud-stream/blob/main/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/StreamBridge.java#L291-L293
However, this messageChannel does not have an ObservationRegistry registered with it. As a result, the messages sent through this dynamically created channel are published without observability support, which means tracing is missing.
Expected Behavior:
Ideally, StreamBridge should ensure that any dynamically created messageChannel is configured with an ObservationRegistry, enabling observability features for all messages published through these channels.
Reference:
https://github.com/spring-projects/spring-integration/blob/main/spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationManagementConfigurer.java#L205-L218