Interface TracingMessage

All Superinterfaces:
Message
All Known Implementing Classes:
DefaultMessage

public interface TracingMessage extends Message
This interface defines a Message compatible with tracing
Author:
Guillaume LAMIRAND (guillaume.lamirand at graviteesource.com), GraviteeSource Team
  • Method Details

    • isTraceable

      default boolean isTraceable()
    • doOnEnd

      TracingMessage doOnEnd(Runnable runnable)
      Behavior to apply when the underlying span will be ended.
      Parameters:
      runnable -
    • end

      void end()
      Run the end behavior defined by doOnEnd(Runnable)
    • tracingAttributes

      Map<String,String> tracingAttributes()
      Return tracing attributes based on Semantic Conventions for Messaging
      Returns:
      map of tracing attributes
    • addTracingAttribute

      void addTracingAttribute(String key, String value)
      Allow to add extra tracing attribute used to trace this message
      Parameters:
      key - the key of the span attribute
      value - the value associated
    • injectSpanContext

      default void injectSpanContext(BaseExecutionContext executionContext, BiConsumer<String,String> textMapSetter)
      Allow to inject message context into the given carrier
      Parameters:
      executionContext - the current execution context
      textMapSetter - the map setter to use