Class Tracer.NoopTracer

  • Enclosing class:
    Tracer

    private static final class Tracer.NoopTracer
    extends Tracer
    • Constructor Detail

      • NoopTracer

        private NoopTracer()
    • Method Detail

      • spanBuilderWithExplicitParent

        public SpanBuilder spanBuilderWithExplicitParent​(java.lang.String spanName,
                                                         @Nullable
                                                         Span parent)
        Description copied from class: Tracer
        Returns a SpanBuilder to create and start a new child Span (or root if parent is null or has an invalid SpanContext), with parent being the designated Span.

        See SpanBuilder for usage examples.

        This must be used to create a Span when manual Context propagation is used OR when creating a root Span with a null parent.

        Specified by:
        spanBuilderWithExplicitParent in class Tracer
        Parameters:
        spanName - The name of the returned Span.
        parent - The parent of the returned Span. If null the SpanBuilder will build a root Span.
        Returns:
        a SpanBuilder to create and start a new Span.
      • spanBuilderWithRemoteParent

        public SpanBuilder spanBuilderWithRemoteParent​(java.lang.String spanName,
                                                       @Nullable
                                                       SpanContext remoteParentSpanContext)
        Description copied from class: Tracer
        Returns a SpanBuilder to create and start a new child Span (or root if parent is SpanContext.INVALID or null), with parent being the remote Span designated by the SpanContext.

        See SpanBuilder for usage examples.

        This must be used to create a Span when the parent is in a different process. This is only intended for use by RPC systems or similar.

        If no SpanContext OR fail to parse the SpanContext on the server side, users must call this method with a null remote parent SpanContext.

        Specified by:
        spanBuilderWithRemoteParent in class Tracer
        Parameters:
        spanName - The name of the returned Span.
        remoteParentSpanContext - The remote parent of the returned Span.
        Returns:
        a SpanBuilder to create and start a new Span.