Class ActiveSpanManager


  • public final class ActiveSpanManager
    extends Object
    Utility class for managing active spans as a stack associated with an exchange.
    • Method Detail

      • getSpan

        public static SpanAdapter getSpan​(org.apache.camel.Exchange exchange)
        This method returns the current active span associated with the exchange.
        Parameters:
        exchange - The exchange
        Returns:
        The current active span, or null if none exists
      • activate

        public static void activate​(org.apache.camel.Exchange exchange,
                                    SpanAdapter span)
        This method activates the supplied span for the supplied exchange. If an existing span is found for the exchange, this will be pushed onto a stack.
        Parameters:
        exchange - The exchange
        span - The span
      • deactivate

        public static void deactivate​(org.apache.camel.Exchange exchange)
        This method deactivates an existing active span associated with the supplied exchange. Once deactivated, if a parent span is found associated with the stack for the exchange, it will be restored as the current span for that exchange.
        Parameters:
        exchange - The exchange