Interface ITraceScopeV1

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
ITraceScope
All Known Implementing Classes:
NoopTraceScope

public interface ITraceScopeV1 extends AutoCloseable
Author:
frank.chen021@outlook.com
Date:
7/9/25 3:48 pm
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Finishes the underlying span and detaches the tracing context from current thread.
    Gets the underlying span for direct manipulation.
    Gets the trace ID associated with this scope
    Gets the tracing mode for this scope
  • Method Details

    • currentTraceId

      String currentTraceId()
      Gets the trace ID associated with this scope
      Returns:
      the trace ID, or null if not available
    • tracingMode

      TracingMode tracingMode()
      Gets the tracing mode for this scope
      Returns:
      the tracing mode
    • currentSpan

      ISpanScope currentSpan()
      Gets the underlying span for direct manipulation.
      Returns:
      the underlying span, or a no-op span if not available. NOTE: every call of this method returns a different instance of the span, even if the span is the same.
    • close

      void close()
      Finishes the underlying span and detaches the tracing context from current thread. This must be called in the same thread where the scope was created, or an exception SdkException is thrown
      Specified by:
      close in interface AutoCloseable