Package sonia.scm.trace
Class Span
java.lang.Object
sonia.scm.trace.Span
- All Implemented Interfaces:
AutoCloseable
A span represents a single unit of work e.g. a request to an external system.
- Since:
- 2.9.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the span a reports the context to theTracer
.failed()
Marks the span as failed.Adds a label to the span.Adds a label to the span.Adds a label to the span.Adds a label to the span.Adds a label to the span.Adds a label to the span.Adds a label to the span.
-
Method Details
-
label
Adds a label to the span.- Parameters:
key
- key of labelvalue
- label value- Returns:
this
-
label
Adds a label to the span.- Parameters:
key
- key of labelvalue
- label value- Returns:
this
-
label
Adds a label to the span.- Parameters:
key
- key of labelvalue
- label value- Returns:
this
-
label
Adds a label to the span.- Parameters:
key
- key of labelvalue
- label value- Returns:
this
-
label
Adds a label to the span.- Parameters:
key
- key of labelvalue
- label value- Returns:
this
-
label
Adds a label to the span.- Parameters:
key
- key of labelvalue
- label value- Returns:
this
-
label
Adds a label to the span.- Parameters:
key
- key of labelvalue
- label value- Returns:
this
-
failed
Marks the span as failed.- Returns:
this
-
close
public void close()Closes the span a reports the context to theTracer
.- Specified by:
close
in interfaceAutoCloseable
-