Span that is used when no Span implementation is available. All
operations are no-op except context propagation.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final PropagatedSpan | |
| private final SpanContext |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Span | addEvent(String
the name of the event. name)Overrides default io. Adds an event to the |
| public Span | addEvent(String
the name of the event. name, long the explicit event timestamp since epoch. timestamp, TimeUnit the unit of the timestamp unit)Overrides default io. Adds an event to the |
| public Span | addEvent(String
the name of the event. name, Attributes the attributes that will be added; these are associated with this event, not
the attributes)Span as for setAttribute().Implements io. Adds an event to the |
| public Span | addEvent(String
the name of the event. name, Attributes the attributes that will be added; these are associated with this event, not
the attributes, long Span as for setAttribute().the explicit event timestamp since epoch. timestamp, TimeUnit the unit of the timestamp unit)Implements io. Adds an event to the |
| pack-priv static Span | |
| public void | |
| public void | end(long
the explicit timestamp from the epoch, for this timestamp, TimeUnit Span. 0
indicates current time should be used.the unit of the timestamp unit)Implements io. Marks the end of |
| public SpanContext | getSpanContext()
Implements io. Returns the |
| public boolean | isRecording()
Implements io. Returns |
| public Span | recordException(Throwable
the exception)Throwable to record.Overrides default io. |
| public Span | recordException(Throwable
the exception, Attributes Throwable to record.the additional additionalAttributes)Attributes to record.Implements io. |
| public Span | setAllAttributes(Attributes
the attributes attributes)Overrides default io. Sets attributes to the |
| public Span | setAttribute(String
the key for this attribute. key, String the value for this attribute. value)Overrides default io. Sets an attribute to the |
| public Span | setAttribute(String
the key for this attribute. key, long the value for this attribute. value)Overrides default io. Sets an attribute to the |
| public Span | setAttribute(String
the key for this attribute. key, double the value for this attribute. value)Overrides default io. Sets an attribute to the |
| public Span | setAttribute(String
the key for this attribute. key, boolean the value for this attribute. value)Overrides default io. Sets an attribute to the |
| public <T> Span | setAttribute(AttributeKey<T>
the key for this attribute. key, T the value for this attribute. value)Implements io. Sets an attribute to the |
| public Span | setStatus(StatusCode
the statusCode)StatusCode to set.Overrides default io. Sets the status to the |
| public Span | setStatus(StatusCode
the statusCode, String StatusCode to set.the description of the description)Status.Implements io. Sets the status to the |
| public String | |
| public Span | updateName(String
the name)Span name.Implements io. Updates the |
| INVALID | back to summary |
|---|---|
| pack-priv static final PropagatedSpan INVALID | |
| spanContext | back to summary |
|---|---|
| private final SpanContext spanContext | |
| PropagatedSpan | back to summary |
|---|---|
| private PropagatedSpan(SpanContext spanContext) | |
| addEvent | back to summary |
|---|---|
| public Span addEvent(String name) Overrides default io. Doc from io. Adds an event to the | |
| addEvent | back to summary |
|---|---|
| public Span addEvent(String name, long timestamp, TimeUnit unit) Overrides default io. Doc from io. Adds an event to the When possible, it is preferred to use | |
| addEvent | back to summary |
|---|---|
| public Span addEvent(String name, Attributes attributes) Implements io. Doc from io. Adds an event to the
| |
| addEvent | back to summary |
|---|---|
| public Span addEvent(String name, Attributes attributes, long timestamp, TimeUnit unit) Implements io. Doc from io. Adds an event to the When possible, it is preferred to use
| |
| create | back to summary |
|---|---|
| pack-priv static Span create(SpanContext spanContext) | |
| end | back to summary |
|---|---|
| public void end() Implements io. Doc from io. Marks the end of Only the timing of the first end call for a given
| |
| end | back to summary |
|---|---|
| public void end(long timestamp, TimeUnit unit) Implements io. Doc from io. Marks the end of Only the timing of the first end call for a given Use this method for specifying explicit end options, such as end | |
| getSpanContext | back to summary |
|---|---|
| public SpanContext getSpanContext() Implements io. Doc from io. Returns the
| |
| isRecording | back to summary |
|---|---|
| public boolean isRecording() Implements io. Doc from io. Returns
| |
| recordException | back to summary |
|---|---|
| public Span recordException(Throwable exception) Overrides default io. Doc from io. Records information about the Note that the EXCEPTION_ESCAPED value from the Semantic Conventions cannot be determined by
this function. You should record this attribute manually using | |
| recordException | back to summary |
|---|---|
| public Span recordException(Throwable exception, Attributes additionalAttributes) Implements io. Doc from io. Records information about the
| |
| setAllAttributes | back to summary |
|---|---|
| public Span setAllAttributes(Attributes attributes) Overrides default io. Doc from io. Sets attributes to the
| |
| setAttribute | back to summary |
|---|---|
| public Span setAttribute(String key, String value) Overrides default io. Doc from io. Sets an attribute to the Empty String "" and null are valid attribute Note It is strongly recommended to use | |
| setAttribute | back to summary |
|---|---|
| public Span setAttribute(String key, long value) Overrides default io. Doc from io. Sets an attribute to the Note It is strongly recommended to use | |
| setAttribute | back to summary |
|---|---|
| public Span setAttribute(String key, double value) Overrides default io. Doc from io. Sets an attribute to the Note It is strongly recommended to use | |
| setAttribute | back to summary |
|---|---|
| public Span setAttribute(String key, boolean value) Overrides default io. Doc from io. Sets an attribute to the Note It is strongly recommended to use | |
| setAttribute | back to summary |
|---|---|
| public <T> Span setAttribute(AttributeKey<T> key, T value) Implements io. Doc from io. Sets an attribute to the Note the behavior of null values is undefined, and hence strongly discouraged.
| |
| setStatus | back to summary |
|---|---|
| public Span setStatus(StatusCode statusCode) Overrides default io. Doc from io. Sets the status to the If used, this will override the default Only the value of the last call will be recorded, and implementations are free to ignore previous calls.
| |
| setStatus | back to summary |
|---|---|
| public Span setStatus(StatusCode statusCode, String description) Implements io. Doc from io. Sets the status to the If used, this will override the default Only the value of the last call will be recorded, and implementations are free to ignore previous calls.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| updateName | back to summary |
|---|---|
| public Span updateName(String name) Implements io. Doc from io. Updates the If used, this will override the name provided via Upon this update, any sampling behavior based on | |