@Immutable public interface SpanData
Span class.| Modifier and Type | Interface and Description |
|---|---|
static interface |
SpanData.Event |
static interface |
SpanData.Link
A link to a
Span. |
static interface |
SpanData.Status
Defines the status of a
Span by providing a standard StatusCanonicalCode in
conjunction with an optional descriptive message. |
| Modifier and Type | Method and Description |
|---|---|
io.opentelemetry.common.ReadableAttributes |
getAttributes()
Returns the attributes recorded for this
Span. |
long |
getEndEpochNanos()
Returns the end epoch timestamp in nanos of this
Span. |
List<SpanData.Event> |
getEvents()
Returns the timed events recorded for this
Span. |
boolean |
getHasEnded()
Returns whether this Span has already been ended.
|
boolean |
getHasRemoteParent()
Returns
true if the parent is on a different process. |
io.opentelemetry.sdk.common.InstrumentationLibraryInfo |
getInstrumentationLibraryInfo()
Returns the instrumentation library specified when creating the tracer which produced this
Span. |
io.opentelemetry.trace.Span.Kind |
getKind()
Returns the kind of this
Span. |
List<SpanData.Link> |
getLinks()
Returns links recorded for this
Span. |
String |
getName()
Returns the name of this
Span. |
String |
getParentSpanId()
Returns the parent
SpanId. |
io.opentelemetry.sdk.resources.Resource |
getResource()
Returns the resource of this
Span. |
String |
getSpanId()
Gets the span id for this span.
|
long |
getStartEpochNanos()
Returns the start epoch timestamp in nanos of this
Span. |
SpanData.Status |
getStatus()
Returns the
Status. |
int |
getTotalAttributeCount()
The total number of attributes that were recorded on this span.
|
int |
getTotalRecordedEvents()
The total number of
SpanData.Event events that were recorded on this span. |
int |
getTotalRecordedLinks()
The total number of
ImmutableLink links that were recorded on this span. |
String |
getTraceId()
Gets the trace id for this span.
|
io.opentelemetry.trace.TraceState |
getTraceState()
Gets the
TraceState for this span. |
boolean |
isSampled()
Whether the 'sampled' option set on this span.
|
String getTraceId()
String getSpanId()
boolean isSampled()
io.opentelemetry.trace.TraceState getTraceState()
TraceState for this span.TraceState for this span.String getParentSpanId()
SpanId. If the Span is a root Span, the SpanId
returned will be invalid..SpanId or an invalid SpanId if this is a root Span.io.opentelemetry.sdk.resources.Resource getResource()
Span.Span.io.opentelemetry.sdk.common.InstrumentationLibraryInfo getInstrumentationLibraryInfo()
Span.InstrumentationLibraryInfoString getName()
Span.Span.io.opentelemetry.trace.Span.Kind getKind()
Span.Span.long getStartEpochNanos()
Span.Span.io.opentelemetry.common.ReadableAttributes getAttributes()
Span.Span.List<SpanData.Event> getEvents()
Span.Span.List<SpanData.Link> getLinks()
Span.Span.SpanData.Status getStatus()
Status.Status.long getEndEpochNanos()
Span.Span.boolean getHasRemoteParent()
true if the parent is on a different process. false if this is a root
span.true if the parent is on a different process. false if this is a root
span.boolean getHasEnded()
true if the span has already been ended, false if not.int getTotalRecordedEvents()
SpanData.Event events that were recorded on this span. This number may be
larger than the number of events that are attached to this span, if the total number recorded
was greater than the configured maximum value. See: TraceConfig.getMaxNumberOfEvents()int getTotalRecordedLinks()
ImmutableLink links that were recorded on this span. This number
may be larger than the number of links that are attached to this span, if the total number
recorded was greater than the configured maximum value. See: TraceConfig.getMaxNumberOfLinks()int getTotalAttributeCount()
TraceConfig.getMaxNumberOfAttributes()