Package brave.jms

Class JmsTracing


  • public final class JmsTracing
    extends Object
    Use this class to decorate your JMS consumer / producer and enable Tracing.
    • Method Detail

      • connection

        public javax.jms.Connection connection​(javax.jms.Connection connection)
      • queueConnection

        public javax.jms.QueueConnection queueConnection​(javax.jms.QueueConnection connection)
      • topicConnection

        public javax.jms.TopicConnection topicConnection​(javax.jms.TopicConnection connection)
      • xaConnection

        public javax.jms.XAConnection xaConnection​(javax.jms.XAConnection xaConnection)
      • xaQueueConnection

        public javax.jms.XAQueueConnection xaQueueConnection​(javax.jms.XAQueueConnection connection)
      • xaTopicConnection

        public javax.jms.XATopicConnection xaTopicConnection​(javax.jms.XATopicConnection connection)
      • connectionFactory

        public javax.jms.ConnectionFactory connectionFactory​(javax.jms.ConnectionFactory connectionFactory)
      • xaConnectionFactory

        public javax.jms.XAConnectionFactory xaConnectionFactory​(javax.jms.XAConnectionFactory xaConnectionFactory)
      • messageListener

        public javax.jms.MessageListener messageListener​(javax.jms.MessageListener messageListener,
                                                         boolean addConsumerSpan)
        Returns a message listener that optionally starts a consumer span for the message received before wrapping the listener in a separate span.
        Parameters:
        messageListener - listener to wrap
        addConsumerSpan - set to true when the underlying message receipt is not traced (ex. JCA)
      • nextSpan

        public Span nextSpan​(javax.jms.Message message)
        Use this to create a span for processing the given message. Note: the result has no name and is not started.

        In general, prefer MessageListener for processing messages, as it is more efficient and less lossy with regards to context data.

        This creates a child from identifiers extracted from the message properties, or a new span if one couldn't be extracted.