Close whole hierarchy at end of message interceptor
Just like in the TraceFilter (web) we need to close the parent (remote) trace after the message has been processed.
This commit is contained in:
@@ -45,7 +45,8 @@ public class TraceChannelInterceptor extends ChannelInterceptorAdapter {
|
||||
@Override
|
||||
public void postSend(Message<?> message, MessageChannel channel, boolean sent) {
|
||||
Trace trace = this.traceHolder.get();
|
||||
this.traceManager.close(trace);
|
||||
// Double close to clean up the parent (remote span as well)
|
||||
this.traceManager.close(this.traceManager.close(trace));
|
||||
this.traceHolder.remove();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user