Class AbstractMessagingSpanDecorator
- java.lang.Object
-
- org.apache.camel.tracing.decorators.AbstractSpanDecorator
-
- org.apache.camel.tracing.decorators.AbstractMessagingSpanDecorator
-
- All Implemented Interfaces:
SpanDecorator
- Direct Known Subclasses:
AmqpSpanDecorator
,AwsSnsSpanDecorator
,AwsSqsSpanDecorator
,CometdSpanDecorator
,IronmqSpanDecorator
,JmsSpanDecorator
,KafkaSpanDecorator
,NatsSpanDecorator
,NsqSpanDecorator
,PahoSpanDecorator
,RabbitmqSpanDecorator
,Sjms2SpanDecorator
,SjmsSpanDecorator
,StompSpanDecorator
public abstract class AbstractMessagingSpanDecorator extends AbstractSpanDecorator
-
-
Field Summary
Fields Modifier and Type Field Description static String
MESSAGE_BUS_ID
-
Fields inherited from interface org.apache.camel.tracing.SpanDecorator
CAMEL_COMPONENT, DEFAULT
-
-
Constructor Summary
Constructors Constructor Description AbstractMessagingSpanDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getDestination(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
This method identifies the destination from the supplied exchange and/or endpoint.ExtractAdapter
getExtractAdapter(Map<String,Object> map, boolean jmsEncoding)
This method returns the map to be used for headers extraction when the component is receiving a communication.SpanKind
getInitiatorSpanKind()
This method returns the 'span.kind' value for use when the component is initiating a communication.InjectAdapter
getInjectAdapter(Map<String,Object> map, boolean jmsEncoding)
This method returns the map to be used for headers injection when the component is receiving a communication.protected String
getMessageId(org.apache.camel.Exchange exchange)
This method identifies the message id for the messaging exchange.String
getOperationName(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
This method returns the operation name to use with the Span representing this exchange and endpoint.SpanKind
getReceiverSpanKind()
This method returns the 'span.kind' value for use when the component is receiving a communication.void
pre(SpanAdapter span, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
This method adds appropriate details (tags/logs) to the supplied span based on the pre processing of the exchange.-
Methods inherited from class org.apache.camel.tracing.decorators.AbstractSpanDecorator
newSpan, post, stripSchemeAndOptions, toQueryParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.camel.tracing.SpanDecorator
getComponent, getComponentClassName
-
-
-
-
Field Detail
-
MESSAGE_BUS_ID
public static final String MESSAGE_BUS_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOperationName
public String getOperationName(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
Description copied from interface:SpanDecorator
This method returns the operation name to use with the Span representing this exchange and endpoint.- Specified by:
getOperationName
in interfaceSpanDecorator
- Overrides:
getOperationName
in classAbstractSpanDecorator
- Parameters:
exchange
- The exchangeendpoint
- The endpoint- Returns:
- The operation name
-
pre
public void pre(SpanAdapter span, org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
Description copied from interface:SpanDecorator
This method adds appropriate details (tags/logs) to the supplied span based on the pre processing of the exchange.- Specified by:
pre
in interfaceSpanDecorator
- Overrides:
pre
in classAbstractSpanDecorator
- Parameters:
span
- The spanexchange
- The exchangeendpoint
- The endpoint
-
getDestination
protected String getDestination(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)
This method identifies the destination from the supplied exchange and/or endpoint.- Parameters:
exchange
- The exchangeendpoint
- The endpoint- Returns:
- The message bus destination
-
getInitiatorSpanKind
public SpanKind getInitiatorSpanKind()
Description copied from interface:SpanDecorator
This method returns the 'span.kind' value for use when the component is initiating a communication.- Specified by:
getInitiatorSpanKind
in interfaceSpanDecorator
- Overrides:
getInitiatorSpanKind
in classAbstractSpanDecorator
- Returns:
- The kind
-
getReceiverSpanKind
public SpanKind getReceiverSpanKind()
Description copied from interface:SpanDecorator
This method returns the 'span.kind' value for use when the component is receiving a communication.- Specified by:
getReceiverSpanKind
in interfaceSpanDecorator
- Overrides:
getReceiverSpanKind
in classAbstractSpanDecorator
- Returns:
- The kind
-
getMessageId
protected String getMessageId(org.apache.camel.Exchange exchange)
This method identifies the message id for the messaging exchange.- Returns:
- The message id, or null if no id exists for the exchange
-
getExtractAdapter
public ExtractAdapter getExtractAdapter(Map<String,Object> map, boolean jmsEncoding)
Description copied from interface:SpanDecorator
This method returns the map to be used for headers extraction when the component is receiving a communication.- Specified by:
getExtractAdapter
in interfaceSpanDecorator
- Overrides:
getExtractAdapter
in classAbstractSpanDecorator
- Parameters:
map
- a map containing the objectsjmsEncoding
- whether the headers are encoded- Returns:
- The extraction map
-
getInjectAdapter
public InjectAdapter getInjectAdapter(Map<String,Object> map, boolean jmsEncoding)
Description copied from interface:SpanDecorator
This method returns the map to be used for headers injection when the component is receiving a communication.- Specified by:
getInjectAdapter
in interfaceSpanDecorator
- Overrides:
getInjectAdapter
in classAbstractSpanDecorator
- Parameters:
map
- a map containing the objectsjmsEncoding
- whether the headers are encoded- Returns:
- The injection map
-
-