Class TracedProxy
java.lang.Object
codes.grow.packages.skywalking.tracing.TracedProxy
- All Implemented Interfaces:
InvocationHandler
Proxy-based interceptor that runs methods annotated with Traced.Method (on the
interface or on the implementation) in a span. Methods returning a CompletionStage end
their span when the stage completes. Other methods are called directly.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TWrapstargetusing the helpers' default tracer.static <T> TWrapstargetwith an explicit tracer.
-
Method Details
-
create
Wrapstargetusing the helpers' default tracer.- Type Parameters:
T- interface type- Parameters:
iface- interface to proxytarget- implementation- Returns:
- traced proxy
-
create
Wrapstargetwith an explicit tracer.- Type Parameters:
T- interface type- Parameters:
iface- interface to proxytarget- implementationtracer- tracer (nullfor the helpers' default)- Returns:
- traced proxy
- Throws:
IllegalArgumentException- whenifaceis not an interface
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-