Interface SpanDecorator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getComponent()
      The camel component name associated with the decorator.
      String getComponentClassName()
      The camel component FQN classname associated with the decorator.
      ExtractAdapter getExtractAdapter​(Map<String,​Object> map, boolean encoding)
      This method returns the map to be used for headers extraction when the component is receiving a communication.
      SpanKind getInitiatorSpanKind()
      This method returns the 'span.kind' value for use when the component is initiating a communication.
      InjectAdapter getInjectAdapter​(Map<String,​Object> map, boolean encoding)
      This method returns the map to be used for headers injection when the component is receiving a communication.
      String 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.
      SpanKind getReceiverSpanKind()
      This method returns the 'span.kind' value for use when the component is receiving a communication.
      boolean newSpan()
      This method indicates whether the component associated with the SpanDecorator should result in a new span being created.
      void post​(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 post processing of the exchange.
      void pre​(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.
    • Method Detail

      • newSpan

        boolean newSpan()
        This method indicates whether the component associated with the SpanDecorator should result in a new span being created.
        Returns:
        Whether a new span should be created
      • getComponent

        String getComponent()
        The camel component name associated with the decorator.
        Returns:
        The camel component name
      • getComponentClassName

        String getComponentClassName()
        The camel component FQN classname associated with the decorator.
        Returns:
        The camel component FQN classname
      • getOperationName

        String 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.
        Parameters:
        exchange - The exchange
        endpoint - The endpoint
        Returns:
        The operation name
      • pre

        void pre​(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.
        Parameters:
        span - The span
        exchange - The exchange
        endpoint - The endpoint
      • post

        void post​(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 post processing of the exchange.
        Parameters:
        span - The span
        exchange - The exchange
        endpoint - The endpoint
      • getInitiatorSpanKind

        SpanKind getInitiatorSpanKind()
        This method returns the 'span.kind' value for use when the component is initiating a communication.
        Returns:
        The kind
      • getReceiverSpanKind

        SpanKind getReceiverSpanKind()
        This method returns the 'span.kind' value for use when the component is receiving a communication.
        Returns:
        The kind
      • getExtractAdapter

        ExtractAdapter getExtractAdapter​(Map<String,​Object> map,
                                         boolean encoding)
        This method returns the map to be used for headers extraction when the component is receiving a communication.
        Parameters:
        map - a map containing the objects
        encoding - whether the headers are encoded
        Returns:
        The extraction map
      • getInjectAdapter

        InjectAdapter getInjectAdapter​(Map<String,​Object> map,
                                       boolean encoding)
        This method returns the map to be used for headers injection when the component is receiving a communication.
        Parameters:
        map - a map containing the objects
        encoding - whether the headers are encoded
        Returns:
        The injection map