Package io.micrometer.tracing
Interface ScopedSpan
public interface ScopedSpan
Represents the "current span" until
end()
()} is called.- Since:
- 1.0.0
-
Field Details
-
NOOP
A noop implementation.
-
-
Method Details
-
isNoop
boolean isNoop()- Returns:
true
when no recording is done and nothing is reported to an external system. However, this span should still be injected into outgoing requests. Use this flag to avoid performing expensive computation.
-
context
TraceContext context()- Returns:
TraceContext
corresponding to this span.
-
name
Sets a name on this span.- Parameters:
name
- name to set on the span- Returns:
- this span
-
tag
Sets a tag on this span.- Parameters:
key
- tag keyvalue
- tag value- Returns:
- this span
-
event
Sets an event on this span.- Parameters:
value
- event name to set on the span- Returns:
- this span
-
error
Records an exception for this span.- Parameters:
throwable
- to record- Returns:
- this span
-
end
void end()Ends the span. The span gets stopped and recorded if not noop.
-