Class Traced
java.lang.Object
codes.grow.packages.datadogapm.tracing.Traced
Tracing of plain functions:
run(String, Callable) and the Traced.Method
annotation honoured by TracedProxy.
String body = Traced.run("fetch-profile", () -> client.fetch(id));
interface Orders {
@Traced.Method("orders.place")
Order place(Cart cart);
}
Orders traced = TracedProxy.create(Orders.class, new OrdersImpl());
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceMarks an interface method (or its implementation) to run in a span when called through aTracedProxy. -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Throwable>
voidrun(String name, ThrowingRunnable<E> fn) Runsfnin a new span.static <T> TRunsfnin a new span (seeSpans.withSpan(String, ThrowingSupplier)).
-
Method Details
-
run
Runsfnin a new span (seeSpans.withSpan(String, ThrowingSupplier)).- Type Parameters:
T- result type- Parameters:
name- span namefn- work- Returns:
- the result
- Throws:
Exception- whatfnthrows
-
run
Runsfnin a new span.- Type Parameters:
E- exception type- Parameters:
name- span namefn- work- Throws:
E- whatfnthrows
-