100 lines
4.5 KiB
JavaScript
100 lines
4.5 KiB
JavaScript
// Metro module 1186 (f1187).
|
|
import { notWeb } from "./Module1002";
|
|
import { reactNativeErrorHandlersIntegration, nativeLinkedErrorsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, breadcrumbsIntegration, dedupeIntegration, httpContextIntegration, nativeReleaseIntegration, eventOriginIntegration, sdkInfoIntegration, reactNativeInfoIntegration, createReactNativeRewriteFrames, deviceContextIntegration, modulesLoaderIntegration, logEnricherIntegration, screenshotIntegration, viewHierarchyIntegration, hermesProfilingIntegration, appStartIntegration, createNativeFramesIntegrations, stallTrackingIntegration, userInteractionIntegration, appRegistryIntegration, timeToDisplayIntegration, httpClientIntegration, expoContextIntegration, spotlightIntegration, mobileReplayIntegration, primitiveTagIntegration } from "./Module811";
|
|
import { browserSessionIntegration, consoleLoggingIntegration } from "./Module1024";
|
|
import { reactNativeTracingIntegration } from "./Module1187";
|
|
export function getDefaultIntegrations(a0) {
|
|
const r3 = [];
|
|
if (notWeb()) {
|
|
r3.push(reactNativeErrorHandlersIntegration({
|
|
patchGlobalPromise: a0.patchGlobalPromise
|
|
}));
|
|
r3.push(nativeLinkedErrorsIntegration());
|
|
} else {
|
|
r3.push(browserApiErrorsIntegration());
|
|
r3.push(browserGlobalHandlersIntegration());
|
|
r3.push(browserLinkedErrorsIntegration());
|
|
if (a0.enableAutoSessionTracking) {
|
|
r3.push(browserSessionIntegration());
|
|
}
|
|
}
|
|
r3.push(inboundFiltersIntegration());
|
|
r3.push(functionToStringIntegration());
|
|
r3.push(breadcrumbsIntegration());
|
|
r3.push(dedupeIntegration());
|
|
r3.push(httpContextIntegration());
|
|
r3.push(nativeReleaseIntegration());
|
|
r3.push(eventOriginIntegration());
|
|
r3.push(sdkInfoIntegration());
|
|
r3.push(reactNativeInfoIntegration());
|
|
r3.push(createReactNativeRewriteFrames());
|
|
if (a0.enableNative) {
|
|
r3.push(deviceContextIntegration());
|
|
r3.push(modulesLoaderIntegration());
|
|
if (a0.enableLogs && a0.logsOrigin !== "native") {
|
|
r3.push(logEnricherIntegration());
|
|
r3.push(consoleLoggingIntegration());
|
|
}
|
|
if (a0.attachScreenshot) {
|
|
r3.push(screenshotIntegration());
|
|
}
|
|
if (a0.attachViewHierarchy) {
|
|
r3.push(viewHierarchyIntegration());
|
|
}
|
|
if (typeof a0.profilesSampleRate === "number") {
|
|
r3.push(hermesProfilingIntegration());
|
|
}
|
|
}
|
|
const tracesSampleRate = a0.tracesSampleRate;
|
|
const r1 = typeof tracesSampleRate !== "number" ? typeof a0.tracesSampler === "function" : typeof tracesSampleRate === "number";
|
|
if ((r1 ? a0.enableAppStartTracking : r1) && a0.enableNative) {
|
|
r3.push(appStartIntegration());
|
|
}
|
|
const nativeFramesIntegrations = createNativeFramesIntegrations((r1 ? a0.enableNativeFramesTracking : r1) && a0.enableNative);
|
|
if (nativeFramesIntegrations) {
|
|
r3.push(nativeFramesIntegrations);
|
|
}
|
|
if (r1 ? a0.enableStallTracking : r1) {
|
|
r3.push(stallTrackingIntegration());
|
|
}
|
|
if (r1 ? a0.enableUserInteractionTracing : r1) {
|
|
r3.push(userInteractionIntegration());
|
|
}
|
|
if (r1 && a0.enableAutoPerformanceTracing) {
|
|
r3.push(appRegistryIntegration());
|
|
r3.push(reactNativeTracingIntegration());
|
|
}
|
|
if (r1) {
|
|
r3.push(timeToDisplayIntegration());
|
|
}
|
|
if (a0.enableCaptureFailedRequests) {
|
|
r3.push(httpClientIntegration());
|
|
}
|
|
r3.push(expoContextIntegration());
|
|
if (a0.spotlight) {
|
|
r3.push(spotlightIntegration({
|
|
sidecarUrl: typeof a0.spotlight === "string" ? a0.spotlight : void 0
|
|
}));
|
|
}
|
|
const replaysOnErrorSampleRate = a0.replaysOnErrorSampleRate;
|
|
let r230 = typeof replaysOnErrorSampleRate !== "number" ? typeof a0.replaysSessionSampleRate === "number" : typeof replaysOnErrorSampleRate === "number";
|
|
const r232 = a0._experiments && typeof a0._experiments.replaysOnErrorSampleRate === "number" || a0._experiments && typeof a0._experiments.replaysSessionSampleRate === "number";
|
|
if (r230 ? !r230 : r232) {
|
|
const _experiments = a0._experiments;
|
|
a0.replaysOnErrorSampleRate = _experiments !== null ? _experiments !== void 0 ? _experiments.replaysOnErrorSampleRate : void 0 : void 0;
|
|
const _experiments2 = a0._experiments;
|
|
a0.replaysSessionSampleRate = _experiments2 !== null ? _experiments2 !== void 0 ? _experiments2.replaysSessionSampleRate : void 0 : void 0;
|
|
}
|
|
if (!r230) {
|
|
r230 = r232;
|
|
}
|
|
if (r230) {
|
|
r230 = notWeb();
|
|
}
|
|
if (r230) {
|
|
r3.push(mobileReplayIntegration());
|
|
}
|
|
r3.push(primitiveTagIntegration());
|
|
return r3;
|
|
}
|