Class ClientSpan


  • public final class ClientSpan
    extends Object
    This class encapsulates the context key for storing the current SpanKind.CLIENT span in the Context.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean exists​(io.opentelemetry.context.Context context)
      Returns true when a SpanKind.CLIENT span is present in the passed context.
      static @Nullable io.opentelemetry.api.trace.Span fromContextOrNull​(io.opentelemetry.context.Context context)
      Returns span of type SpanKind.CLIENT from the given context or null if not found.
      static io.opentelemetry.context.Context with​(io.opentelemetry.context.Context context, io.opentelemetry.api.trace.Span clientSpan)  
    • Method Detail

      • exists

        public static boolean exists​(io.opentelemetry.context.Context context)
        Returns true when a SpanKind.CLIENT span is present in the passed context.
      • fromContextOrNull

        public static @Nullable io.opentelemetry.api.trace.Span fromContextOrNull​(io.opentelemetry.context.Context context)
        Returns span of type SpanKind.CLIENT from the given context or null if not found.
      • with

        public static io.opentelemetry.context.Context with​(io.opentelemetry.context.Context context,
                                                            io.opentelemetry.api.trace.Span clientSpan)