-
public final class SpanExtKt
-
-
Method Summary
Modifier and Type Method Description final static <T extends Any> TwithinSpan(String operationName, OpenObserveSpan parentSpan, Boolean activate, Function1<OpenObserveSpan, T> block)Wraps the provided lambda within a OpenObserveSpan. -
-
Method Detail
-
withinSpan
final static <T extends Any> T withinSpan(String operationName, OpenObserveSpan parentSpan, Boolean activate, Function1<OpenObserveSpan, T> block)
Wraps the provided lambda within a OpenObserveSpan.
- Parameters:
operationName- the name of the OpenObserveSpan created around the lambdaparentSpan- the parent OpenObserveSpan (default isnull)activate- whether the created OpenObserveSpan should be made active for the current thread (default istrue)block- the lambda function traced by this newly created OpenObserveSpan
-
-
-
-