Package com.mendix.tracing
Interface Span
- All Superinterfaces:
AutoCloseable
Represents a span in a trace.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the span.recordException(Throwable throwable) Record an exception in this span.setAttribute(String key, boolean value) Set a boolean attribute.setAttribute(String key, double value) Set a double attribute.setAttribute(String key, long value) Set a long attribute.setAttribute(String key, String value) Set a String attribute.default SpanSet the status of this span to ERROR and record the exception.default SpansetStatus(Span.Status status) Set the status of this span.setStatus(Span.Status status, String description) Set the status of this span with a description.
-
Method Details
-
close
void close()Close the span.- Specified by:
closein interfaceAutoCloseable
-
setStatus
Set the status of this span with a description.- Parameters:
status- the statusdescription- the description of the status- Returns:
- this
-
setStatus
Set the status of this span.- Parameters:
status- the status- Returns:
- this
-
recordException
Record an exception in this span.- Parameters:
throwable- the throwable to record- Returns:
- this
-
setError
Set the status of this span to ERROR and record the exception. The description of the status will be set to the exception message.- Parameters:
throwable- the throwable to record- Returns:
- this
-
setAttribute
Set a String attribute.- Parameters:
key- The attribute keyvalue- the attribute value- Returns:
- this
-
setAttribute
Set a boolean attribute.- Parameters:
key- The attribute keyvalue- the attribute value- Returns:
- this
-
setAttribute
Set a long attribute.- Parameters:
key- The attribute keyvalue- the attribute value- Returns:
- this
-
setAttribute
Set a double attribute.- Parameters:
key- The attribute keyvalue- the attribute value- Returns:
- this
-