Class ServerSpan


  • public final class ServerSpan
    extends Object
    This class encapsulates the context key for storing the current SpanKind.SERVER span in the Context.
    • Method Detail

      • exists

        @Deprecated
        public static boolean exists​(io.opentelemetry.context.Context context)
        Deprecated.
        This method should not be used directly; it's functionality is encapsulated inside the Instrumenter API.
        Returns true when a SpanKind.SERVER span is present in the passed context.
      • fromContextOrNull

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

        @Deprecated
        public static io.opentelemetry.context.Context with​(io.opentelemetry.context.Context context,
                                                            io.opentelemetry.api.trace.Span serverSpan)
        Deprecated.
        This method should not be used directly; it's functionality is encapsulated inside the Instrumenter API.
        Marks the span as the server span in the passed context.