Class ThresholdLogSpanContext

java.lang.Object
com.couchbase.client.core.tracing.ThresholdLogSpanContext
All Implemented Interfaces:
io.opentracing.SpanContext

public class ThresholdLogSpanContext extends Object implements io.opentracing.SpanContext
Holds baggage items for the slow operation spans. This class is thread safe!
Since:
1.6.0
Author:
Michael Nitschinger
  • Constructor Details

    • ThresholdLogSpanContext

      public ThresholdLogSpanContext()
      Creates a new ThresholdLogSpanContext with empty baggage.
  • Method Details

    • baggageItems

      public Iterable<Map.Entry<String,String>> baggageItems()
      Specified by:
      baggageItems in interface io.opentracing.SpanContext
    • baggageItem

      public ThresholdLogSpanContext baggageItem(String item, String value)
      Stores the given baggage item/value. If an item already exists, it will be overridden.
      Parameters:
      item - the item to store.
      value - the value to store.
      Returns:
      this ThresholdLogSpanContext for chaining purposes.
    • baggageItem

      public String baggageItem(String item)
      Retrieve the baggage value by item.
      Parameters:
      item - the item to look up.
      Returns:
      the value if found, null otherwise.