public interface ReadableSpan
Modifier and Type | Method and Description |
---|---|
InstrumentationLibraryInfo |
getInstrumentationLibraryInfo()
Returns the instrumentation library specified when creating the tracer which produced this
span.
|
long |
getLatencyNanos()
Returns the latency of the
Span in nanos. |
String |
getName()
Returns the name of the
Span . |
io.opentelemetry.trace.SpanContext |
getSpanContext()
Returns the
SpanContext of the Span . |
boolean |
hasEnded()
Returns whether this Span has already been ended.
|
SpanData |
toSpanData()
This converts this instance into an immutable SpanData instance, for use in export.
|
io.opentelemetry.trace.SpanContext getSpanContext()
SpanContext
of the Span
.
Equivalent with Span.getContext()
.
SpanContext
of the Span
.String getName()
Span
.
The name can be changed during the lifetime of the Span by using the Span.updateName(String)
so this value cannot be cached.
Span
.SpanData toSpanData()
SpanData
instance.InstrumentationLibraryInfo getInstrumentationLibraryInfo()
InstrumentationLibraryInfo
describing the instrumentation
libraryboolean hasEnded()
true
if the span has already been ended, false
if not.long getLatencyNanos()
Span
in nanos. If still active then returns now() - start
time.Span
in nanos.