// Metro module 6364 (f6365). import { addGlobalErrorInstrumentationHandler } from "./instrumentError_6365"; import { addGlobalUnhandledRejectionInstrumentationHandler } from "./instrumentUnhandledRejection_6372"; import { getActiveSpan, getRootSpan } from "./spanTimeInputToSeconds"; import { DEBUG_BUILD } from "./Module6396"; import { logger } from "./consoleSandbox_6368"; import { SPAN_STATUS_ERROR } from "./Module6385"; let c4063_2; const errorCallback = function errorCallback() { const activeSpan = getActiveSpan(); const r3 = activeSpan && getRootSpan(activeSpan); if (r3) { if (DEBUG_BUILD) { logger.log(`[Tracing] Root span: internal_error -> Global error occurred`); } r3.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" }); } }; c4063_2 = false; errorCallback.tag = "sentry_tracingErrorCallback"; export function registerSpanErrorInstrumentation() { if (!c4063_2) { c4063_2 = true; addGlobalErrorInstrumentationHandler(errorCallback); addGlobalUnhandledRejectionInstrumentationHandler(errorCallback); } }