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,AzureServiceBusSpanDecorator,CometdSpanDecorator,IronmqSpanDecorator,JmsSpanDecorator,KafkaSpanDecorator,NatsSpanDecorator,Paho5SpanDecorator,PahoSpanDecorator,Sjms2SpanDecorator,SjmsSpanDecorator,SpringRabbitmqSpanDecorator,StompSpanDecorator
-
Field Summary
Fields inherited from interface org.apache.camel.tracing.SpanDecorator
CAMEL_COMPONENT, DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetDestination(org.apache.camel.Exchange exchange, org.apache.camel.Endpoint endpoint) This method identifies the destination from the supplied exchange and/or endpoint.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.This method returns the 'span.kind' value for use when the component is initiating a communication.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 StringgetMessageId(org.apache.camel.Exchange exchange) This method identifies the message id for the messaging exchange.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.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, toQueryParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.tracing.SpanDecorator
getComponent, getComponentClassName
-
Constructor Details
-
AbstractMessagingSpanDecorator
public AbstractMessagingSpanDecorator()
-
-
Method Details
-
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
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
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
This method identifies the message id for the messaging exchange.- Returns:
- The message id, or null if no id exists for the exchange
-
getExtractAdapter
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
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
-