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,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 StringMESSAGE_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 StringgetDestination(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint)This method identifies the destination from the supplied exchange and/or endpoint.ExtractAdaptergetExtractAdapter(Map<String,Object> map, boolean jmsEncoding)This method returns the map to be used for headers extraction when the component is receiving a communication.SpanKindgetInitiatorSpanKind()This method returns the 'span.kind' value for use when the component is initiating a communication.InjectAdaptergetInjectAdapter(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 StringgetMessageId(org.apache.camel.Exchange exchange)This method identifies the message id for the messaging exchange.StringgetOperationName(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.SpanKindgetReceiverSpanKind()This method returns the 'span.kind' value for use when the component is receiving a communication.voidpre(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:SpanDecoratorThis method returns the operation name to use with the Span representing this exchange and endpoint.- Specified by:
getOperationNamein interfaceSpanDecorator- Overrides:
getOperationNamein 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:SpanDecoratorThis method adds appropriate details (tags/logs) to the supplied span based on the pre processing of the exchange.- Specified by:
prein interfaceSpanDecorator- Overrides:
prein 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:SpanDecoratorThis method returns the 'span.kind' value for use when the component is initiating a communication.- Specified by:
getInitiatorSpanKindin interfaceSpanDecorator- Overrides:
getInitiatorSpanKindin classAbstractSpanDecorator- Returns:
- The kind
-
getReceiverSpanKind
public SpanKind getReceiverSpanKind()
Description copied from interface:SpanDecoratorThis method returns the 'span.kind' value for use when the component is receiving a communication.- Specified by:
getReceiverSpanKindin interfaceSpanDecorator- Overrides:
getReceiverSpanKindin 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:SpanDecoratorThis method returns the map to be used for headers extraction when the component is receiving a communication.- Specified by:
getExtractAdapterin interfaceSpanDecorator- Overrides:
getExtractAdapterin 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:SpanDecoratorThis method returns the map to be used for headers injection when the component is receiving a communication.- Specified by:
getInjectAdapterin interfaceSpanDecorator- Overrides:
getInjectAdapterin classAbstractSpanDecorator- Parameters:
map- a map containing the objectsjmsEncoding- whether the headers are encoded- Returns:
- The injection map
-
-