@sentry/node
Version:
Sentry Node SDK using OpenTelemetry for performance instrumentation
14 lines • 830 B
TypeScript
/**
* This is a minimal version of `wrap` from shimmer:
* https://github.com/othiym23/shimmer/blob/master/index.js
*
* In contrast to the original implementation, this version does not allow to unwrap,
* and does not make it clear that the method is wrapped.
* This is necessary because we want to wrap the http module with our own code,
* while still allowing to use the HttpInstrumentation from OTEL.
*
* Without this, if we'd just use `wrap` from shimmer, the OTEL instrumentation would remove our wrapping,
* because it only allows any module to be wrapped a single time.
*/
export declare function stealthWrap<Nodule extends object, FieldName extends keyof Nodule>(nodule: Nodule, name: FieldName, wrapper: (original: Nodule[FieldName]) => Nodule[FieldName]): Nodule[FieldName];
//# sourceMappingURL=utils.d.ts.map