Skip to main content

InstrumentationStrategy

This interface is used to define a strategy for instrumenting methods of classes which are decorated with the Instrument decorator.

Signature
interface InstrumentationStrategy extends InjectableStrategy {    wrapMethod(args: WrappedMethodArgs): any;}

wrapMethod

method(args: WrappedMethodArgs) => any

When a method of an instrumented class is called, it will be wrapped (by means of a Proxy) and this method will be called. The applyOriginalFunction function will apply the original method and return the result.

Was this chapter helpful?
Report Issue
Edited Feb 4, 2026·Edit this page