93 lines
5.8 KiB
React
93 lines
5.8 KiB
React
/* Metro module 1174; source: unknown; dependencies: [1010, 1168, 823, 1032, 826] */
|
|
function _fun13046(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:6, offset: 0x00ddf317, size: 172 bytes, params: 8, frame: 19
|
|
var object2;
|
|
const env0_0 = require;
|
|
const closure = getReactNativeTracingIntegration;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object2 = {'traceFetch': null, 'traceXHR': true, 'enableHTTPTimings': true};
|
|
const value = require(1010) /* metro dependency 1010 */;
|
|
object2.traceFetch = !!value.isWeb();
|
|
exports.INTEGRATION_NAME = 'ReactNativeTracing';
|
|
exports.defaultReactNativeTracingOptions = object2;
|
|
exports.reactNativeTracingIntegration = reactNativeTracingIntegration;
|
|
exports.getCurrentReactNativeTracingIntegration = function() {
|
|
var value2 = require(dependencyMap[4]).getClient();
|
|
if (value2) {
|
|
return getReactNativeTracingIntegration(value2);
|
|
}
|
|
};
|
|
exports.getReactNativeTracingIntegration = closure;
|
|
}
|
|
|
|
function getDefaultTracePropagationTargets() { // fn#13047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:119, offset: 0x00ddf3c3, size: 63 bytes, params: 1, frame: 11
|
|
const value = require(1010) /* metro dependency 1010 */;
|
|
if (value.isWeb()) {
|
|
return undefined;
|
|
}
|
|
return [RegExp('.*', '')];
|
|
}
|
|
|
|
function getReactNativeTracingIntegration(a0) { // fn#13048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:267, offset: 0x00ddf402, size: 23 bytes, params: 2, frame: 11
|
|
return a0.getIntegrationByName(env0_2);
|
|
}
|
|
|
|
function reactNativeTracingIntegration() { // fn#13049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:435, offset: 0x00ddf419, size: 364 bytes, params: 1, frame: 23
|
|
const defaultIdleOptions = (require(1168) /* metro dependency 1168 */).defaultIdleOptions;
|
|
const value = undefined;
|
|
const r9 = arguments.length > 0 && value !== arguments[0] ? arguments[0] : {};
|
|
const object2 = {currentRoute: value};
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const Object2 = global.Object;
|
|
const assign2 = Object2.assign;
|
|
const Object3 = global.Object;
|
|
const value4 = Reflect.apply(assign2, Object2, [Object3.assign({}, env0_3), r9]);
|
|
const beforeStartSpan = r9.beforeStartSpan;
|
|
const finalTimeoutMs = r9.finalTimeoutMs;
|
|
const idleTimeoutMs = r9.idleTimeoutMs;
|
|
const value5 = Reflect.apply(assign, Object, [value4, {beforeStartSpan: beforeStartSpan === null ? function(a0) {
|
|
return a0;
|
|
} : value !== beforeStartSpan ? beforeStartSpan : _fun13050,
|
|
finalTimeoutMs: finalTimeoutMs === null ? defaultIdleOptions.finalTimeout : value !== finalTimeoutMs ? finalTimeoutMs : defaultIdleOptions.finalTimeout,
|
|
idleTimeoutMs: idleTimeoutMs === null ? defaultIdleOptions.idleTimeout : value !== idleTimeoutMs ? idleTimeoutMs : defaultIdleOptions.idleTimeout}]);
|
|
const shouldCreateSpanForRequest = value5.shouldCreateSpanForRequest;
|
|
const env0_2 = shouldCreateSpanForRequest;
|
|
const devServer = (require(823) /* metro dependency 823 */).getDevServer();
|
|
value5.shouldCreateSpanForRequest = value === (devServer === null || value === devServer ? value : devServer.url) ? shouldCreateSpanForRequest : _fun13051;
|
|
return {name: env0_2, setup: setup_13052, processEvent: processEvent_13053, options: value5, state: object2,
|
|
setCurrentRoute: setCurrentRoute};
|
|
}
|
|
|
|
function _fun13051(a0) { // fn#13051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:1007, offset: 0x00ddf585, size: 53 bytes, params: 2, frame: 13
|
|
return !a0.startsWith(url) && (shouldCreateSpanForRequest ? shouldCreateSpanForRequest(a0) : !shouldCreateSpanForRequest);
|
|
}
|
|
|
|
function reactNativeTracingIntegrationSetup(a0) { // fn#13052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:1106, owner: reactNativeTracingIntegration.setup, offset: 0x00ddf5ba, size: 167 bytes, params: 2, frame: 17
|
|
const value = environment.__proto__;
|
|
(require(1168) /* metro dependency 1168 */).addDefaultOpForSpanFrom(a0);
|
|
(require(1168) /* metro dependency 1168 */).addThreadInfoToSpan(a0);
|
|
const moduleValue3 = require(1032) /* metro dependency 1032 */;
|
|
const instrumentOutgoingRequests = moduleValue3.instrumentOutgoingRequests;
|
|
const object2 = {};
|
|
object2.traceFetch = env0_1.traceFetch;
|
|
object2.traceXHR = env0_1.traceXHR;
|
|
object2.shouldCreateSpanForRequest = env0_1.shouldCreateSpanForRequest;
|
|
const getOptions = a0.getOptions;
|
|
object2.tracePropagationTargets = Reflect.apply(getOptions, a0,
|
|
[]).tracePropagationTargets || getDefaultTracePropagationTargets();
|
|
Reflect.apply(instrumentOutgoingRequests, moduleValue3, [a0, object2]);
|
|
}
|
|
|
|
function reactNativeTracingIntegrationProcessEvent(a0) { // fn#13053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:1444, owner: reactNativeTracingIntegration.processEvent, offset: 0x00ddf661, size: 101 bytes, params: 2, frame: 16
|
|
if (a0.contexts && env0_0.currentRoute) {
|
|
a0.contexts.app = global.Object.assign({view_names: [env0_0.currentRoute]}, a0.contexts.app);
|
|
}
|
|
return a0;
|
|
}
|
|
|
|
function setCurrentRoute(a0) { // fn#13054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1301:1618, owner: reactNativeTracingIntegration.setCurrentRoute, offset: 0x00ddf6c6, size: 20 bytes, params: 2, frame: 2
|
|
env0_0.currentRoute = a0;
|
|
}
|
|
|