public class TracingChannelInterceptor
extends org.springframework.messaging.support.ChannelInterceptorAdapter
implements org.springframework.messaging.support.ExecutorChannelInterceptor
ExecutorChannelInterceptor to instrument the websocket
communications using an OpenTracing Tracer.| Modifier and Type | Field and Description |
|---|---|
protected static String |
OPENTRACING_SCOPE
Header name used to carry the current active scope.
|
protected static String |
OPENTRACING_SPAN
Header name used to carry the current
Span from the initial preSend phase to the
beforeHandle phase. |
protected static String |
SIMP_DESTINATION
The STOMP simple destination.
|
protected static String |
SIMP_MESSAGE_TYPE
The STOMP simple message type, values defined in enum
SimpMessageType. |
protected static String |
WEBSOCKET
The span component tag value.
|
| Constructor and Description |
|---|
TracingChannelInterceptor(io.opentracing.Tracer tracer,
String spanKind) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterMessageHandled(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel,
org.springframework.messaging.MessageHandler handler,
Exception arg3) |
org.springframework.messaging.Message<?> |
beforeHandle(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel,
org.springframework.messaging.MessageHandler handler) |
org.springframework.messaging.Message<?> |
preSend(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel) |
afterReceiveCompletion, afterSendCompletion, postReceive, postSend, preReceiveprotected static final String WEBSOCKET
protected static final String SIMP_DESTINATION
protected static final String SIMP_MESSAGE_TYPE
SimpMessageType.protected static final String OPENTRACING_SPAN
Span from the initial preSend phase to the
beforeHandle phase.protected static final String OPENTRACING_SCOPE
public TracingChannelInterceptor(io.opentracing.Tracer tracer,
String spanKind)
public org.springframework.messaging.Message<?> preSend(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel)
preSend in interface org.springframework.messaging.support.ChannelInterceptorpreSend in class org.springframework.messaging.support.ChannelInterceptorAdapterpublic void afterMessageHandled(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel,
org.springframework.messaging.MessageHandler handler,
Exception arg3)
afterMessageHandled in interface org.springframework.messaging.support.ExecutorChannelInterceptorpublic org.springframework.messaging.Message<?> beforeHandle(org.springframework.messaging.Message<?> message,
org.springframework.messaging.MessageChannel channel,
org.springframework.messaging.MessageHandler handler)
beforeHandle in interface org.springframework.messaging.support.ExecutorChannelInterceptorCopyright © 2017–2020. All rights reserved.