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, PahoSpanDecorator, Sjms2SpanDecorator, SjmsSpanDecorator, SpringRabbitmqSpanDecorator, StompSpanDecorator

public abstract class AbstractMessagingSpanDecorator extends AbstractSpanDecorator
  • Field Details

  • 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: SpanDecorator
      This method returns the operation name to use with the Span representing this exchange and endpoint.
      Specified by:
      getOperationName in interface SpanDecorator
      Overrides:
      getOperationName in class AbstractSpanDecorator
      Parameters:
      exchange - The exchange
      endpoint - 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 interface SpanDecorator
      Overrides:
      pre in class AbstractSpanDecorator
      Parameters:
      span - The span
      exchange - The exchange
      endpoint - 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 exchange
      endpoint - 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 interface SpanDecorator
      Overrides:
      getInitiatorSpanKind in class AbstractSpanDecorator
      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 interface SpanDecorator
      Overrides:
      getReceiverSpanKind in class AbstractSpanDecorator
      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 interface SpanDecorator
      Overrides:
      getExtractAdapter in class AbstractSpanDecorator
      Parameters:
      map - a map containing the objects
      jmsEncoding - 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 interface SpanDecorator
      Overrides:
      getInjectAdapter in class AbstractSpanDecorator
      Parameters:
      map - a map containing the objects
      jmsEncoding - whether the headers are encoded
      Returns:
      The injection map