Interface TraceUtil.Span
- Enclosing interface:
- TraceUtil
public static interface TraceUtil.Span
Represents a trace span.
-
Method Summary
Modifier and TypeMethodDescriptionAdds the given event to this span.Adds the given event with the given attributes to this span.void
end()
Ends this span.void
Ends this span in an error.<T> void
endAtFuture
(com.google.api.core.ApiFuture<T> futureValue) If an operation ends in the future, its relevant span should end _after_ the future has been completed.io.opentelemetry.api.trace.Span
getSpan()
Marks this span as the current span.setAttribute
(String key, boolean value) Adds the given attribute to this span.setAttribute
(String key, int value) Adds the given attribute to this span.setAttribute
(String key, String value) Adds the given attribute to this span.
-
Method Details
-
addEvent
Adds the given event to this span. -
addEvent
Adds the given event with the given attributes to this span. -
setAttribute
Adds the given attribute to this span. -
setAttribute
Adds the given attribute to this span. -
setAttribute
Adds the given attribute to this span. -
getSpan
io.opentelemetry.api.trace.Span getSpan() -
makeCurrent
TraceUtil.Scope makeCurrent()Marks this span as the current span. -
end
void end()Ends this span. -
end
Ends this span in an error. -
endAtFuture
<T> void endAtFuture(com.google.api.core.ApiFuture<T> futureValue) If an operation ends in the future, its relevant span should end _after_ the future has been completed. This method "appends" the span completion code at the completion of the given future. In order for telemetry info to be recorded, the future returned by this method should be completed.
-