You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the OpenTracingChannelInterceptor class may cause the application to go in OOM because the Span gets started but are not always closed. Also, since the Scope remains active, the references (wrong parent).
In the code below, the Span is created and is made active in the ScopeManager.
That logic only works if the application is using a DirectChannel but it's unlikely to work with something like the ExecutorChannel.
Furthermore, it appears that Spring Cloud Stream has a DirectChannel implementation that is not actually "direct" and needs to be excluded according to the code in Sleuth.
Our issue was with the DirectWithAttributesChannel specifically, but the fix we are testing is to only activate the Span if it's a DirectChannel, pass both the Span and Scope in the headers and close both of them in the afterSendCompletion.
The text was updated successfully, but these errors were encountered:
Using the
OpenTracingChannelInterceptor
class may cause the application to go in OOM because the Span gets started but are not always closed. Also, since the Scope remains active, the references (wrong parent).In the code below, the Span is created and is made active in the ScopeManager.
java-spring-messaging/opentracing-spring-messaging/src/main/java/io/opentracing/contrib/spring/integration/messaging/OpenTracingChannelInterceptor.java
Lines 71 to 72 in 1c5c758
It's supposed to be closed here:
java-spring-messaging/opentracing-spring-messaging/src/main/java/io/opentracing/contrib/spring/integration/messaging/OpenTracingChannelInterceptor.java
Lines 89 to 93 in 1c5c758
That logic only works if the application is using a
DirectChannel
but it's unlikely to work with something like theExecutorChannel
.Furthermore, it appears that Spring Cloud Stream has a
DirectChannel
implementation that is not actually "direct" and needs to be excluded according to the code in Sleuth.Our issue was with the
DirectWithAttributesChannel
specifically, but the fix we are testing is to only activate the Span if it's aDirectChannel
, pass both the Span and Scope in the headers and close both of them in theafterSendCompletion
.The text was updated successfully, but these errors were encountered: