The callbacks to call for the instrumented function, you must provide at least the request and/or response callbacks, both are not required. You must always supply the error callback

interface IInstrumentHooksCallbacks {
    fnErr?: InstrumentorHooksCallback;
    hkErr?: InstrumentorHooksCallback;
    ns?: string | string[];
    req?: InstrumentorHooksCallback;
    rsp?: InstrumentorHooksCallback;
}

Properties

The callback to call if the original function causes an exception, even if you supply a callback the original exception will still be thrown

The callback to call if the hook function causes an exception

ns?: string | string[]

[Optional] Namespace details (same as the namespace used for events), useful for debugging and testing to identify the source of the instrumented hooks

The hook callback to call before the original function is called

The hook callback to call after the original function was called