MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / domainify

Function domainify

packages/google-cloud-serverless/src/utils.ts:8–10  ·  view source on GitHub ↗
(fn: (...args: A) => R)

Source from the content-addressed store, hash-verified

6 * @returns function which runs in the newly created domain or in the existing one
7 */
8export function domainify<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R | void {
9 return (...args) => withIsolationScope(() => fn(...args));
10}
11
12/**
13 * @param source function to be wrapped

Callers 5

wrapFunction · 0.90
wrapEventFunctionFunction · 0.90
_wrapEventFunctionFunction · 0.90
wrapCloudEventFunctionFunction · 0.90
_wrapCloudEventFunctionFunction · 0.90

Calls 2

withIsolationScopeFunction · 0.90
fnFunction · 0.50

Tested by

no test coverage detected