Checks if certain function has been already wrapped
It will register instrumentations and plugins
returns function to unload instrumentation and plugins that were registered
It will register instrumentations and plugins
returns function to unload instrumentation and plugins that were registered
function to execute patched function and being able to catch errors
function to be executed
callback to run when execute finishes
Async function to execute patched function and being able to catch errors
function to be executed
callback to run when execute finishes
Generated using TypeDoc
SpanCustomizationHook is a common way for instrumentations to expose extension points where users can add custom behavior to a span based on info object passed to the hook at different times of the span lifecycle. This is an advanced feature, commonly used to add additional or non-spec-compliant attributes to the span, capture payloads, modify the span in some way, or carry some other side effect.
The hook is registered with the instrumentation specific config by implementing an handler function with this signature, and if the hook is present, it will be called with the span and the event information when the event is emitted.
When and under what conditions the hook is called and what data is passed in the info argument, is specific to each instrumentation and life-cycle event and should be documented where it is used.
Instrumentation may define multiple hooks, for different spans, or different span life-cycle events.