Class TestSpanData

java.lang.Object
io.opentelemetry.sdk.testing.trace.TestSpanData
All Implemented Interfaces:
io.opentelemetry.sdk.trace.data.SpanData

@Immutable public abstract class TestSpanData extends Object implements io.opentelemetry.sdk.trace.data.SpanData
Immutable representation of all data collected by the Span class.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    A Builder class for TestSpanData.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a new Builder for creating an SpanData instance.
    io.opentelemetry.sdk.common.InstrumentationLibraryInfo
    Deprecated.
    abstract io.opentelemetry.sdk.common.InstrumentationScopeInfo
     
    final boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.opentelemetry.sdk.trace.data.SpanData

    getAttributes, getEndEpochNanos, getEvents, getKind, getLinks, getName, getParentSpanContext, getParentSpanId, getResource, getSpanContext, getSpanId, getStartEpochNanos, getStatus, getTotalAttributeCount, getTotalRecordedEvents, getTotalRecordedLinks, getTraceId
  • Method Details

    • builder

      public static TestSpanData.Builder builder()
      Creates a new Builder for creating an SpanData instance.
      Returns:
      a new Builder.
    • hasEnded

      public final boolean hasEnded()
      Specified by:
      hasEnded in interface io.opentelemetry.sdk.trace.data.SpanData
    • getInstrumentationLibraryInfo

      @Deprecated public io.opentelemetry.sdk.common.InstrumentationLibraryInfo getInstrumentationLibraryInfo()
      Deprecated.
      Specified by:
      getInstrumentationLibraryInfo in interface io.opentelemetry.sdk.trace.data.SpanData
    • getInstrumentationScopeInfo

      public abstract io.opentelemetry.sdk.common.InstrumentationScopeInfo getInstrumentationScopeInfo()
      Specified by:
      getInstrumentationScopeInfo in interface io.opentelemetry.sdk.trace.data.SpanData