Interface BaggageManager

All Known Subinterfaces:
Tracer

public interface BaggageManager
Manages Baggage entries. Upon retrieval / creation of a baggage entry puts it in scope. Scope must be closed.
Since:
1.0.0
  • Field Details

  • Method Details

    • getAllBaggage

      Map<String,String> getAllBaggage()
      Returns:
      mapping of all baggage entries from the given scope
    • getBaggage

      @Nullable Baggage getBaggage(String name)
      Retrieves Baggage for the given name.
      Parameters:
      name - baggage name
      Returns:
      baggage or null if not present
    • getBaggage

      @Nullable Baggage getBaggage(TraceContext traceContext, String name)
      Retrieves Baggage for the given name.
      Parameters:
      traceContext - trace context with baggage attached to it
      name - baggage name
      Returns:
      baggage or null if not present
    • createBaggage

      Baggage createBaggage(String name)
      Creates a new Baggage entry for the given name or returns an existing one if it's already present.
      Parameters:
      name - baggage name
      Returns:
      new or already created baggage
    • createBaggage

      Baggage createBaggage(String name, String value)
      Creates a new Baggage entry for the given name or returns an existing one if it's already present.
      Parameters:
      name - baggage name
      value - baggage value
      Returns:
      new or already created baggage