decord/source/1166_INTEGRATION_NAME.js

119 lines
3.8 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1166
2026-07-29 08:29:29 +00:00
// Function ID: 1167
2026-07-20 16:05:17 +00:00
// Name: INTEGRATION_NAME
2026-07-29 08:29:29 +00:00
// Dependencies: [1002, 1160, 814, 1024, 817]
// Exports: getCurrentReactNativeTracingIntegration, getReactNativeTracingIntegration, reactNativeTracingIntegration
2026-07-20 16:05:17 +00:00
// Module 1166 (INTEGRATION_NAME)
2026-07-29 08:29:29 +00:00
import isHermesEnabled from "isHermesEnabled";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const ReactNativeTracing = "ReactNativeTracing";
let obj = { traceFetch: null, traceXHR: true, enableHTTPTimings: true };
obj[0] = isHermesEnabled.isWeb();
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const INTEGRATION_NAME = "ReactNativeTracing";
export const defaultReactNativeTracingOptions = obj;
export const reactNativeTracingIntegration = () => {
let obj = arg0;
if (arg0 === undefined) {
obj = {};
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let merged1;
let fn2;
let url;
2026-08-05 07:35:12 +00:00
obj = { currentRoute: "Array" };
2026-07-29 08:29:29 +00:00
let fn = obj.beforeStartSpan;
const merged = Object.assign(Object.assign({}, url), obj);
if (null === fn) {
fn = (arg0) => arg0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { beforeStartSpan: fn, finalTimeoutMs: null, idleTimeoutMs: null };
let finalTimeout = obj.finalTimeoutMs;
if (null === finalTimeout) {
finalTimeout = obj(merged1[1]).defaultIdleOptions.finalTimeout;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = finalTimeout;
let idleTimeout = obj.idleTimeoutMs;
if (null === idleTimeout) {
idleTimeout = obj(merged1[1]).defaultIdleOptions.idleTimeout;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = idleTimeout;
merged1 = Object.assign(merged, obj);
fn2 = merged1.shouldCreateSpanForRequest;
const devServer = obj(merged1[2]).getDevServer();
url = undefined;
if (null !== devServer) {
if (undefined !== devServer) {
url = devServer.url;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
if (undefined !== url) {
fn2 = (str) => {
const startsWithResult = str.startsWith(url);
let tmp2 = !startsWithResult;
if (!startsWithResult) {
let tmp3Result = !fn2;
if (fn2) {
tmp3Result = tmp3(str);
}
tmp2 = tmp3Result;
}
return tmp2;
};
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
merged1.shouldCreateSpanForRequest = fn2;
2026-07-20 16:05:17 +00:00
return {
2026-07-29 08:29:29 +00:00
name: fn2,
setup(getOptions) {
obj = obj(merged1[1]);
const result = obj.addDefaultOpForSpanFrom(getOptions);
obj(merged1[1]).addThreadInfoToSpan(getOptions);
const obj2 = obj(merged1[1]);
const tmp = obj;
const tmp2 = merged1;
obj = { traceFetch: merged1.traceFetch, traceXHR: merged1.traceXHR, shouldCreateSpanForRequest: merged1.shouldCreateSpanForRequest, tracePropagationTargets: null };
let tracePropagationTargets = getOptions.getOptions().tracePropagationTargets;
if (!tracePropagationTargets) {
let tmp5;
if (!tmpResult.isWeb()) {
const items = [/.*/];
tmp5 = items;
}
tracePropagationTargets = tmp5;
tmpResult = tmp(tmp2[0]);
}
obj[3] = tracePropagationTargets;
const result1 = obj(merged1[3]).instrumentOutgoingRequests(getOptions, obj);
},
processEvent(contexts) {
let currentRoute = contexts.contexts;
if (currentRoute) {
currentRoute = obj.currentRoute;
}
if (currentRoute) {
const _Object = Object;
obj = { view_names: null };
const items = [obj.currentRoute];
obj[0] = items;
contexts.contexts.app = Object.assign(obj, contexts.contexts.app);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return contexts;
},
options: merged1,
state: obj,
setCurrentRoute(componentName) {
obj.currentRoute = componentName;
2026-07-20 16:05:17 +00:00
}
};
};
2026-07-29 08:29:29 +00:00
export const getCurrentReactNativeTracingIntegration = function getCurrentReactNativeTracingIntegration() {
const client = require(817) /* registerSpanErrorInstrumentation */.getClient();
if (client) {
return client.getIntegrationByName(ReactNativeTracing);
}
const obj = require(817) /* registerSpanErrorInstrumentation */;
};
export const getReactNativeTracingIntegration = function getReactNativeTracingIntegration(getIntegrationByName) {
return getIntegrationByName.getIntegrationByName(ReactNativeTracing);
};