Package 

Class SpanExtKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit setError(Span $self, Throwable throwable) Helper method to attach a Throwable to this Span.
      final static Unit setError(Span $self, String message) Helper method to attach an error message to this Span.
      final static <T extends Any> T withinSpan(String operationName, Span parentSpan, Boolean activate, Function1<Span, T> block) Wraps the provided lambda within a Span.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 lambda
        parentSpan - the parent Span (default is null)
        activate - whether the created Span should be made active for the current thread (default is true)
        block - the lambda function traced by this newly created Span