79 lines
3 KiB
JavaScript
79 lines
3 KiB
JavaScript
// Module ID: 7803
|
|
// Function ID: 7804
|
|
// Name: getClient
|
|
// Dependencies: [7794, 7795, 7777, 7797, 7782]
|
|
|
|
// Module 7803 (getClient)
|
|
import getGlobalSingleton from "getGlobalSingleton" /* 7777 */;
|
|
import addNonEnumerableProperty from "addNonEnumerableProperty" /* 7782 */;
|
|
import getMainCarrier from "getMainCarrier" /* 7794 */;
|
|
import getAsyncContextStrategy from "getAsyncContextStrategy" /* 7795 */;
|
|
|
|
require = arg1;
|
|
const dependencyMap = arg6;
|
|
arg5.getClient = function getClient() {
|
|
const mainCarrier = getMainCarrier.getMainCarrier();
|
|
const obj = getMainCarrier;
|
|
const asyncContextStrategy = getAsyncContextStrategy.getAsyncContextStrategy(mainCarrier);
|
|
const currentScope = asyncContextStrategy.getCurrentScope();
|
|
return currentScope.getClient();
|
|
};
|
|
arg5.getCurrentScope = function getCurrentScope() {
|
|
const mainCarrier = getMainCarrier.getMainCarrier();
|
|
const obj = getMainCarrier;
|
|
const asyncContextStrategy = getAsyncContextStrategy.getAsyncContextStrategy(mainCarrier);
|
|
return asyncContextStrategy.getCurrentScope();
|
|
};
|
|
arg5.getGlobalScope = function getGlobalScope() {
|
|
return getGlobalSingleton.getGlobalSingleton("globalScope", () => {
|
|
const scope = new callback(table[3]).Scope();
|
|
return scope;
|
|
});
|
|
};
|
|
arg5.getIsolationScope = function getIsolationScope() {
|
|
const mainCarrier = getMainCarrier.getMainCarrier();
|
|
const obj = getMainCarrier;
|
|
const asyncContextStrategy = getAsyncContextStrategy.getAsyncContextStrategy(mainCarrier);
|
|
return asyncContextStrategy.getIsolationScope();
|
|
};
|
|
arg5.getTraceContextFromScope = function getTraceContextFromScope(getPropagationContext) {
|
|
const propagationContext = getPropagationContext.getPropagationContext();
|
|
({ traceId, spanId, parentSpanId } = propagationContext);
|
|
return addNonEnumerableProperty.dropUndefinedKeys({ trace_id, span_id, parent_span_id });
|
|
};
|
|
arg5.withIsolationScope = function withIsolationScope() {
|
|
const items = [...arguments];
|
|
const mainCarrier = getMainCarrier.getMainCarrier();
|
|
const obj = getMainCarrier;
|
|
const asyncContextStrategy = getAsyncContextStrategy.getAsyncContextStrategy(mainCarrier);
|
|
if (2 === items.length) {
|
|
[tmp2, tmp3] = items;
|
|
if (tmp2) {
|
|
let result = asyncContextStrategy.withSetIsolationScope(tmp2, tmp3);
|
|
} else {
|
|
result = asyncContextStrategy.withIsolationScope(tmp3);
|
|
}
|
|
return result;
|
|
} else {
|
|
return asyncContextStrategy.withIsolationScope(items[0]);
|
|
}
|
|
const obj2 = getAsyncContextStrategy;
|
|
};
|
|
arg5.withScope = function withScope() {
|
|
const items = [...arguments];
|
|
const mainCarrier = getMainCarrier.getMainCarrier();
|
|
const obj = getMainCarrier;
|
|
const asyncContextStrategy = getAsyncContextStrategy.getAsyncContextStrategy(mainCarrier);
|
|
if (2 === items.length) {
|
|
[tmp2, tmp3] = items;
|
|
if (tmp2) {
|
|
let withSetScopeResult = asyncContextStrategy.withSetScope(tmp2, tmp3);
|
|
} else {
|
|
withSetScopeResult = asyncContextStrategy.withScope(tmp3);
|
|
}
|
|
return withSetScopeResult;
|
|
} else {
|
|
return asyncContextStrategy.withScope(items[0]);
|
|
}
|
|
const obj2 = getAsyncContextStrategy;
|
|
};
|