-
public final class SpanExtKt
-
-
Method Summary
Modifier and Type Method Description final static UnitsetError(Span $self, Throwable throwable)Helper method to attach a Throwable to this Span. final static UnitsetError(Span $self, String message)Helper method to attach an error message to this Span. final static <T extends Any> TwithinSpan(String operationName, Span parentSpan, Boolean activate, Function1<Span, T> block)Wraps the provided lambda within a Span. -
-
Method Detail
-
setError
final static Unit setError(Span $self, Throwable throwable)
Helper method to attach a Throwable to this Span. The Throwable information (class name, message and stacktrace) will be added to this Span as standard Error Tags.
- Parameters:
throwable- the Throwable you wan to log
-
setError
final static Unit setError(Span $self, String message)
Helper method to attach an error message to this Span. The error message will be added to this Span as a standard Error Tag.
- Parameters:
message- the error message you want to attach.
-
withinSpan
final static <T extends Any> T withinSpan(String operationName, Span parentSpan, Boolean activate, Function1<Span, T> block)
Wraps the provided lambda within a Span.
- Parameters:
operationName- the name of the Span created around the lambdaparentSpan- the parent Span (default isnull)activate- whether the created Span should be made active for the current thread (default istrue)block- the lambda function traced by this newly created Span
-
-
-
-