1532 lines
103 KiB
JavaScript
1532 lines
103 KiB
JavaScript
/* Metro module 1160; source: unknown; dependencies: [65, 826, 1009, 1161, 1130, 1163, 1164, 1165, 1166, 1167, 1168] */
|
|
import Module00065 from './module-00065.js'; /* Metro dependency 65 */
|
|
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
|
|
|
|
function _fun12889(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:6, offset: 0x00dd9c42, size: 234 bytes, params: 8, frame: 20
|
|
var closure3;
|
|
let value = this;
|
|
let env0_0 = require;
|
|
const _captureAppStart2 = _captureAppStart;
|
|
const setRootComponentCreationTimestampMs2 = setRootComponentCreationTimestampMs;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let env0_2 = Module00065;
|
|
if (!(value && value.__awaiter)) {
|
|
closure3 = function(a0, a1, a2, a3) {
|
|
var r2;
|
|
var value = a2;
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var env0_2 = value;
|
|
var env0_3 = a3;
|
|
r2 = value || global.Promise;
|
|
value = Object.create(r2.prototype, {constructor: {value: r2}});
|
|
var value2 = new r2(_fun12896);
|
|
return value2 instanceof Object ? value2 : value;
|
|
};
|
|
}
|
|
const _setAppStartEndData2 = _setAppStartEndData;
|
|
exports.captureAppStart = function() {
|
|
return _captureAppStart({isManual: true});
|
|
};
|
|
exports._captureAppStart = _captureAppStart2;
|
|
exports.setRootComponentCreationTimestampMs = setRootComponentCreationTimestampMs2;
|
|
exports._setRootComponentCreationTimestampMs = function(a0) {
|
|
setRootComponentCreationTimestampMs(a0);
|
|
env0_8 = false;
|
|
};
|
|
exports._setAppStartEndData = _setAppStartEndData2;
|
|
exports._clearRootComponentCreationTimestampMs = function() {
|
|
env0_7 = undefined;
|
|
};
|
|
exports.appStartIntegration = appStartIntegration;
|
|
function _captureAppStart({isManual}) { // fn#12890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:524, offset: 0x00dd9d2c, size: 42 bytes, params: 2, frame: 15
|
|
return env0_3(this, undefined, undefined, _fun12892);
|
|
function* _fun12892() { // fn#12892, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:601, offset: 0x00dd9d5f, size: 400 bytes, params: 1, frame: 22
|
|
var r8;
|
|
var r1;
|
|
var debug;
|
|
var value6;
|
|
var binding2;
|
|
var value7;
|
|
var timestampInSeconds;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var NATIVE;
|
|
var enableNative;
|
|
var binding3;
|
|
var property;
|
|
var value11;
|
|
var fetchNativeFrames;
|
|
var nativeFrames;
|
|
var value12;
|
|
var value13;
|
|
var binding4;
|
|
var value14;
|
|
var log;
|
|
var error;
|
|
var getIntegrationByName;
|
|
var value15;
|
|
var captureStandaloneAppStart;
|
|
var value16;
|
|
var value17;
|
|
var value18;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
let binding = env2_0;
|
|
const client = binding(env2_1[1]).getClient();
|
|
if (client) {
|
|
reducibleJoin26: while (true) {
|
|
reduciblePort25: while (true) {
|
|
exceptionLanding24: while (true) {
|
|
value6 = environment.__proto__;
|
|
env2_6 = dependencyMap;
|
|
binding = env2_0;
|
|
binding2 = env2_1;
|
|
value7 = binding(binding2[1]);
|
|
timestampInSeconds = value7.timestampInSeconds;
|
|
value8 = Reflect.apply(timestampInSeconds, value7, []);
|
|
value9 = 1000 * value8;
|
|
value10 = null;
|
|
NATIVE = binding(binding2[2]).NATIVE;
|
|
enableNative = NATIVE.enableNative;
|
|
if (enableNative) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
binding3 = env2_1;
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
property = binding3[2];
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value11 = binding(property);
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
NATIVE = value11.NATIVE;
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
fetchNativeFrames = NATIVE.fetchNativeFrames;
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
nativeFrames = Reflect.apply(fetchNativeFrames, NATIVE, []);
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
yield nativeFrames;
|
|
try {
|
|
value12 = undefined;
|
|
value13 = false;
|
|
} catch (error) {
|
|
r8 = value10;
|
|
break exceptionLanding24;
|
|
}
|
|
if (value13) {
|
|
return value12;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
r8 = value12;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
binding4 = env2_1;
|
|
} catch (error) {
|
|
r8 = value12;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
property = binding4[1];
|
|
} catch (error) {
|
|
r8 = value12;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value14 = binding(property);
|
|
} catch (error) {
|
|
r8 = value12;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
debug = value14.debug;
|
|
} catch (error) {
|
|
r8 = value12;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
log = debug.log;
|
|
} catch (error) {
|
|
r8 = value12;
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
Reflect.apply(log, debug, ['[AppStart] Captured end frames for app start.', value12]);
|
|
} catch (error) {
|
|
r8 = value12;
|
|
break exceptionLanding24;
|
|
}
|
|
r8 = value12;
|
|
break reduciblePort25;
|
|
}
|
|
r8 = value10;
|
|
break reduciblePort25;
|
|
}
|
|
binding = env2_0;
|
|
debug = binding(env2_1[1]).debug;
|
|
log = debug.log;
|
|
Reflect.apply(log, debug, ['[AppStart] Failed to capture end frames for app start.', error]);
|
|
break reduciblePort25;
|
|
}
|
|
binding = env2_9;
|
|
binding({timestampMs: value9, endFrames: r8});
|
|
getIntegrationByName = client.getIntegrationByName;
|
|
value15 = Reflect.apply(getIntegrationByName, client, [env2_4]);
|
|
env1_0 = value15;
|
|
reducibleJoin28: while (true) {
|
|
if (value10 === value15) {
|
|
r1 = value;
|
|
break reducibleJoin28;
|
|
}
|
|
break reducibleJoin26;
|
|
}
|
|
yield r1;
|
|
value17 = undefined;
|
|
value18 = false;
|
|
return value18 ? value17 : value;
|
|
}
|
|
reducibleJoin28: while (true) {
|
|
if (value === require) {
|
|
r1 = value;
|
|
break reducibleJoin28;
|
|
}
|
|
captureStandaloneAppStart = require.captureStandaloneAppStart;
|
|
value16 = Reflect.apply(captureStandaloneAppStart, require, []);
|
|
r1 = value16;
|
|
break reducibleJoin28;
|
|
}
|
|
yield r1;
|
|
value17 = undefined;
|
|
value18 = false;
|
|
reducibleJoin30: while (true) {
|
|
if (value18) {
|
|
return value17;
|
|
}
|
|
break reducibleJoin30;
|
|
}
|
|
} else {
|
|
env2_0(env2_1[1]).debug.warn('[AppStart] Could not capture App Start, missing client.');
|
|
}
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function setRootComponentCreationTimestampMs(a0) { // fn#12893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:1138, offset: 0x00dd9eef, size: 139 bytes, params: 2, frame: 13
|
|
const debug = (Module00826Module).debug;
|
|
const value2 = undefined;
|
|
if (env0_5 == null ? value2 : env0_5.timestampMs) {
|
|
debug.warn('Setting Root component creation timestamp after app start end is set.');
|
|
}
|
|
if (env0_7) {
|
|
debug.warn('Overwriting already set root component creation timestamp.');
|
|
}
|
|
env0_7 = a0;
|
|
return value2;
|
|
}
|
|
|
|
function setSpanDurationAsMeasurementOnTransactionEvent(a0, a1, a2) { // fn#12894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:1515, offset: 0x00dd9f7a, size: 148 bytes, params: 4, frame: 13
|
|
const debug = (Module00826Module).debug;
|
|
var measurements;
|
|
if (a2.timestamp) {
|
|
if (a2.start_timestamp) {
|
|
measurements = a0.measurements;
|
|
a0.measurements = measurements || ({});
|
|
measurements = a0.measurements;
|
|
measurements[a1] = {value: 1000 * (a2.timestamp - a2.start_timestamp), unit: 'millisecond'};
|
|
} else {
|
|
debug.warn('Span is missing start or end timestamp. Cam not set measurement on transaction event.');
|
|
}
|
|
} else {
|
|
debug.warn('Span is missing start or end timestamp. Cam not set measurement on transaction event.');
|
|
}
|
|
}
|
|
|
|
function _fun12895(a0, a1, a2, a3) { // fn#12895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:132, offset: 0x00dda00e, size: 75 bytes, params: 5, frame: 12
|
|
let value = a2;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_3 = a3;
|
|
let r2 = value || global.Promise;
|
|
value = Object.create(r2.prototype, {constructor: {value: r2}});
|
|
r2 = new r2(_fun12896);
|
|
return r2 instanceof Object ? r2 : value;
|
|
function _fun12896(a0, a1) { // fn#12896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:178, offset: 0x00dda059, size: 98 bytes, params: 3, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const step_128992 = step_12899;
|
|
const value2 = importAll.apply(env0_0, require || []);
|
|
step_128992(value2.next());
|
|
function fulfilled_12897(a0) { // fn#12897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:192, offset: 0x00d57fb9, size: 56 bytes, params: 2, frame: 12
|
|
var value;
|
|
var step_12899Binding;
|
|
var value2;
|
|
var next;
|
|
var value3;
|
|
var error;
|
|
try {
|
|
value = environment;
|
|
step_12899Binding = step_12899;
|
|
value2 = environment.__proto__;
|
|
next = importAll.next;
|
|
value3 = Reflect.apply(next, importAll, [a0]);
|
|
step_12899Binding(value3);
|
|
} catch (error) {
|
|
require(error);
|
|
}
|
|
}
|
|
|
|
function rejected_12898(a0) { // fn#12898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:249, offset: 0x00d57ff1, size: 57 bytes, params: 2, frame: 12
|
|
var value;
|
|
var step_12899Binding;
|
|
var value2;
|
|
var value3;
|
|
var error;
|
|
try {
|
|
value = environment;
|
|
step_12899Binding = step_12899;
|
|
value2 = environment.__proto__;
|
|
value3 = importAll.throw(a0);
|
|
step_12899Binding(value3);
|
|
} catch (error) {
|
|
require(error);
|
|
}
|
|
}
|
|
|
|
function step_12899(a0) { // fn#12899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:306, offset: 0x00dda0bb, size: 77 bytes, params: 2, frame: 14
|
|
var value;
|
|
if (a0.done) {
|
|
env0_0(a0.value);
|
|
} else {
|
|
value = a0.value;
|
|
value = step_12899Adopt(value);
|
|
value.then(fulfilled_12897, rejected_12898);
|
|
}
|
|
function step_12899Adopt(a0) { // fn#12900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:341, owner: step_12899.adopt, offset: 0x00dda108, size: 54 bytes, params: 2, frame: 12
|
|
const value = a0;
|
|
return value instanceof env2_2 ? value : new env2_2(_fun12901);
|
|
function _fun12901(a0) { // fn#12901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:390, offset: 0x00cd9b0e, size: 19 bytes, params: 2, frame: 11
|
|
a0(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _setAppStartEndData(a0) { // fn#12902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:1409, offset: 0x00dda13e, size: 65 bytes, params: 2, frame: 12
|
|
if (env0_5) {
|
|
(require(826) /* metro dependency 826 */).debug.warn('Overwriting already set app start end data.');
|
|
}
|
|
env0_5 = a0;
|
|
}
|
|
|
|
function appStartIntegration() { // fn#12906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:2316, offset: 0x00dda1bc, size: 164 bytes, params: 1, frame: 6
|
|
let r1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
const standalone = r1.standalone;
|
|
r1 = standalone !== undefined && standalone;
|
|
return {name: false, setup: setup_12917, afterAllSetup: afterAllSetup_12918, processEvent: processEvent_12920,
|
|
captureStandaloneAppStart: captureStandaloneAppStart, setFirstStartedActiveRootSpanId: function(a0) {
|
|
require(dependencyMap[1]).debug.log('[AppStart] First started active root span id recorded.', a0);
|
|
}};
|
|
function attachAppStartToTransactionEvent(a0) { // fn#12907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:2704, owner: appStartIntegration.attachAppStartToTransactionEvent, offset: 0x00dda260, size: 36 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
return env1_3(this, undefined, undefined, _fun12909);
|
|
function* _fun12909() { // fn#12909, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:2784, offset: 0x00dda28d, size: 2424 bytes, params: 1, frame: 34
|
|
var environment;
|
|
var r3;
|
|
var r18;
|
|
var r22;
|
|
var endFrames;
|
|
var r17;
|
|
var r6;
|
|
var binding;
|
|
var debug;
|
|
var value5;
|
|
var NATIVE;
|
|
var value6;
|
|
var app_start_timestamp_ms;
|
|
var value10;
|
|
var data;
|
|
var object;
|
|
var binding2;
|
|
var binding3;
|
|
var SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
var UI_LOAD;
|
|
var spans;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var log;
|
|
var type;
|
|
var value15;
|
|
var createSpanJSON;
|
|
var totalFrames;
|
|
var slowFrames;
|
|
var frozenFrames;
|
|
var concat;
|
|
var bundleStartTimestampMs;
|
|
var value20;
|
|
var binding7;
|
|
var binding8;
|
|
var value21;
|
|
var createChildSpanJSON;
|
|
var value22;
|
|
var value23;
|
|
var value24;
|
|
var JSON;
|
|
var measurements;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
if (!env2_3) {
|
|
var contexts = env1_0.contexts;
|
|
contexts2 = contexts;
|
|
var value4 = undefined;
|
|
var trace = contexts === null || value4 === contexts2 ? value4 : contexts2.trace;
|
|
if (trace) {
|
|
if (require) {
|
|
value5 = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
NATIVE = binding(env3_1[2]).NATIVE;
|
|
yield NATIVE.fetchNativeAppStart();
|
|
value6 = undefined;
|
|
if (false) {
|
|
return value6;
|
|
}
|
|
if (value6) {
|
|
if (value6.has_fetched) {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Measured app start metrics were already reported from the native layer.');
|
|
} else {
|
|
app_start_timestamp_ms = value6.app_start_timestamp_ms;
|
|
if (app_start_timestamp_ms) {
|
|
r3 = (env3_5 == null ? value4 : env3_5.timestampMs) || env3_0(env3_1[6]).getBundleStartTimestampMs();
|
|
if (r3) {
|
|
if (env1_0.start_timestamp) {
|
|
if (app_start_timestamp_ms >= 1000 * env1_0.start_timestamp - 60000) {
|
|
value10 = r3 - app_start_timestamp_ms;
|
|
if (value10 >= 60000) {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start duration is over a minute long, not adding app start span.');
|
|
} else if (value10 < 0) {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Last recorded app start end timestamp is before the app start timestamp.',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'This is usually caused by missing `Sentry.wrap(RootComponent)` call.');
|
|
} else {
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
contexts = binding.contexts;
|
|
data = contexts.trace.data;
|
|
trace.data = data || ({});
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
data = trace.data;
|
|
binding2 = env3_0;
|
|
binding3 = env3_1;
|
|
SEMANTIC_ATTRIBUTE_SENTRY_OP = binding2(binding3[7]).SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
UI_LOAD = binding2(binding3[5]).UI_LOAD;
|
|
data[SEMANTIC_ATTRIBUTE_SENTRY_OP] = UI_LOAD;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
UI_LOAD = binding2(binding3[5]).UI_LOAD;
|
|
trace.op = UI_LOAD;
|
|
binding = env3_6;
|
|
value = env3_0(env3_1[8]);
|
|
r18 = binding ? value.SPAN_ORIGIN_MANUAL_APP_START : value.SPAN_ORIGIN_AUTO_APP_START;
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
data = trace.data;
|
|
data[env3_0(env3_1[1]).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = r18;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
trace.origin = r18;
|
|
value = app_start_timestamp_ms / 1000;
|
|
binding.start_timestamp = value;
|
|
spans = binding.spans;
|
|
binding.spans = spans || [];
|
|
spans = env1_0.spans;
|
|
value11 = spans.find(function(a0) {
|
|
return a0.op === 'ui.load.initial_display';
|
|
});
|
|
if (value11) {
|
|
value11.start_timestamp = value;
|
|
env3_12(env1_0, 'time_to_initial_display', value11);
|
|
}
|
|
value12 = spans.find(_fun12911);
|
|
if (value12) {
|
|
value12.start_timestamp = value;
|
|
env3_12(env1_0, 'time_to_full_display', value12);
|
|
}
|
|
value13 = r3 / 1000;
|
|
r3 = env1_0.timestamp && env1_0.timestamp < value13;
|
|
if (r3) {
|
|
env3_0(env3_1[1]).debug.log('[AppStart] Transaction event timestamp is before app start end. Adjusting transaction event timestamp.');
|
|
env1_0.timestamp = value13;
|
|
}
|
|
type = value6.type;
|
|
r22 = type === 'cold' ? env3_0(env3_1[5]).APP_START_COLD : env3_0(env3_1[5]).APP_START_WARM;
|
|
binding = env3_0;
|
|
value15 = binding(env3_1[6]);
|
|
createSpanJSON = value15.createSpanJSON;
|
|
object = {op: r22};
|
|
type = value6.type;
|
|
r22 = type !== 'cold' ? 'Warm Start' : 'Cold Start';
|
|
object.description = r22;
|
|
object.start_timestamp = value;
|
|
object.timestamp = value13;
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
object.trace_id = trace.trace_id;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
object.parent_span_id = trace.span_id;
|
|
object.origin = r18;
|
|
value = Reflect.apply(createSpanJSON, value15, [object]);
|
|
endFrames = env3_5 == null ? value4 : env3_5.endFrames;
|
|
if (endFrames) {
|
|
endFrames = env3_5.endFrames;
|
|
totalFrames = endFrames.totalFrames;
|
|
if (totalFrames <= 0) {
|
|
slowFrames = endFrames.slowFrames;
|
|
if (slowFrames <= 0) {
|
|
totalFrames = endFrames.totalFrames;
|
|
if (totalFrames <= 0) {
|
|
debug = env3_0(env3_1[1]).debug;
|
|
debug.warn('[AppStart] Detected zero slow or frozen frames. Not adding measurements to spanId (' + value.span_id + ').');
|
|
} else {
|
|
data = value.data;
|
|
value.data = data || ({});
|
|
data = value.data;
|
|
totalFrames = endFrames.totalFrames;
|
|
data['frames.total'] = totalFrames;
|
|
data = value.data;
|
|
slowFrames = endFrames.slowFrames;
|
|
data['frames.slow'] = slowFrames;
|
|
data = value.data;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
data['frames.frozen'] = frozenFrames;
|
|
debug = env3_0(env3_1[1]).debug;
|
|
log = debug.log;
|
|
totalFrames = endFrames.totalFrames;
|
|
slowFrames = endFrames.slowFrames;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Attached frame data to span.',
|
|
{spanId: value.span_id,
|
|
frameData: {total: totalFrames, slow: slowFrames,
|
|
frozen: frozenFrames}}]);
|
|
}
|
|
} else {
|
|
data = value.data;
|
|
value.data = data || ({});
|
|
data = value.data;
|
|
totalFrames = endFrames.totalFrames;
|
|
data['frames.total'] = totalFrames;
|
|
data = value.data;
|
|
slowFrames = endFrames.slowFrames;
|
|
data['frames.slow'] = slowFrames;
|
|
data = value.data;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
data['frames.frozen'] = frozenFrames;
|
|
debug = env3_0(env3_1[1]).debug;
|
|
log = debug.log;
|
|
totalFrames = endFrames.totalFrames;
|
|
slowFrames = endFrames.slowFrames;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Attached frame data to span.',
|
|
{spanId: value.span_id,
|
|
frameData: {total: totalFrames, slow: slowFrames,
|
|
frozen: frozenFrames}}]);
|
|
}
|
|
} else {
|
|
data = value.data;
|
|
value.data = data || ({});
|
|
data = value.data;
|
|
totalFrames = endFrames.totalFrames;
|
|
data['frames.total'] = totalFrames;
|
|
data = value.data;
|
|
slowFrames = endFrames.slowFrames;
|
|
data['frames.slow'] = slowFrames;
|
|
data = value.data;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
data['frames.frozen'] = frozenFrames;
|
|
debug = env3_0(env3_1[1]).debug;
|
|
log = debug.log;
|
|
totalFrames = endFrames.totalFrames;
|
|
slowFrames = endFrames.slowFrames;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Attached frame data to span.',
|
|
{spanId: value.span_id,
|
|
frameData: {total: totalFrames, slow: slowFrames,
|
|
frozen: frozenFrames}}]);
|
|
}
|
|
}
|
|
binding = env3_7;
|
|
bundleStartTimestampMs = env3_0(env3_1[6]).getBundleStartTimestampMs();
|
|
if (bundleStartTimestampMs) {
|
|
value20 = bundleStartTimestampMs / 1000;
|
|
if (value20 < value.start_timestamp) {
|
|
env3_0(env3_1[1]).debug.warn('Bundle start timestamp is before the app start span start timestamp. Skipping JS execution span.');
|
|
r17 = value4;
|
|
} else {
|
|
binding7 = env3_0;
|
|
binding8 = env3_1;
|
|
if (binding) {
|
|
value22 = binding7(binding8[6]);
|
|
createChildSpanJSON = value22.createChildSpanJSON;
|
|
object = {description: 'JS Bundle Execution Before React Root',
|
|
|
|
start_timestamp: value20,
|
|
timestamp: binding / 1000};
|
|
binding = env3_8;
|
|
value23 = env3_0(env3_1[8]);
|
|
object.origin = binding ? value23.SPAN_ORIGIN_MANUAL_APP_START : value23.SPAN_ORIGIN_AUTO_APP_START;
|
|
r17 = Reflect.apply(createChildSpanJSON, value22, [value,
|
|
object]);
|
|
} else {
|
|
binding7(binding8[1]).debug.warn('Missing the root component first constructor call timestamp.');
|
|
value21 = binding7(binding8[6]);
|
|
createChildSpanJSON = value21.createChildSpanJSON;
|
|
object = {description: 'JS Bundle Execution Start',
|
|
start_timestamp: value20,
|
|
timestamp: value20};
|
|
object.origin = binding7(binding8[8]).SPAN_ORIGIN_AUTO_APP_START;
|
|
r17 = Reflect.apply(createChildSpanJSON, value21, [value,
|
|
object]);
|
|
}
|
|
}
|
|
} else {
|
|
r17 = value4;
|
|
}
|
|
object = [value];
|
|
concat = object.concat;
|
|
binding = env3_2;
|
|
r3 = r17 ? [r17] : [];
|
|
value24 = binding(r3);
|
|
binding = env3_2;
|
|
value = Reflect.apply(concat, object, [value24,
|
|
binding(convertNativeSpansToSpanJSON(value,
|
|
value6.spans))]);
|
|
spans.push.apply(spans, binding(value));
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
log = debug.log;
|
|
JSON = global.JSON;
|
|
value = JSON.stringify(value, value4, 2);
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Added app start spans to transaction event.',
|
|
value]);
|
|
type = value6.type;
|
|
r6 = type === 'cold' ? env3_0(env3_1[9]).APP_START_COLD : env3_0(env3_1[9]).APP_START_WARM;
|
|
object = {value: value10, unit: 'millisecond'};
|
|
binding = env1_0;
|
|
measurements = binding.measurements;
|
|
binding.measurements = measurements || ({});
|
|
measurements = env1_0.measurements;
|
|
measurements[r6] = object;
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
log = debug.log;
|
|
JSON = global.JSON;
|
|
value = JSON.stringify(object, value4, 2);
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Added app start measurement to transaction event.',
|
|
value]);
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Javascript failed to record app start end. `_setAppStartEndData` was not called nor could the bundle start be found.');
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start timestamp could not be loaded from the native layer.');
|
|
}
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Failed to retrieve the app start metrics from the native layer.');
|
|
}
|
|
return undefined;
|
|
}
|
|
if (env2_5) {
|
|
binding = env2_5;
|
|
contexts = env1_0.contexts;
|
|
trace = contexts.trace;
|
|
if (binding === trace.span_id) {
|
|
value5 = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
NATIVE = binding(env3_1[2]).NATIVE;
|
|
yield NATIVE.fetchNativeAppStart();
|
|
value6 = undefined;
|
|
if (false) {
|
|
return value6;
|
|
}
|
|
if (value6) {
|
|
if (value6.has_fetched) {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Measured app start metrics were already reported from the native layer.');
|
|
} else {
|
|
app_start_timestamp_ms = value6.app_start_timestamp_ms;
|
|
if (app_start_timestamp_ms) {
|
|
r3 = (env3_5 == null ? value4 : env3_5.timestampMs) || env3_0(env3_1[6]).getBundleStartTimestampMs();
|
|
if (r3) {
|
|
if (env1_0.start_timestamp) {
|
|
if (app_start_timestamp_ms >= 1000 * env1_0.start_timestamp - 60000) {
|
|
value10 = r3 - app_start_timestamp_ms;
|
|
if (value10 >= 60000) {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start duration is over a minute long, not adding app start span.');
|
|
} else if (value10 < 0) {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Last recorded app start end timestamp is before the app start timestamp.',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'This is usually caused by missing `Sentry.wrap(RootComponent)` call.');
|
|
} else {
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
contexts = binding.contexts;
|
|
data = contexts.trace.data;
|
|
trace.data = data || ({});
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
data = trace.data;
|
|
binding2 = env3_0;
|
|
binding3 = env3_1;
|
|
SEMANTIC_ATTRIBUTE_SENTRY_OP = binding2(binding3[7]).SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
UI_LOAD = binding2(binding3[5]).UI_LOAD;
|
|
data[SEMANTIC_ATTRIBUTE_SENTRY_OP] = UI_LOAD;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
UI_LOAD = binding2(binding3[5]).UI_LOAD;
|
|
trace.op = UI_LOAD;
|
|
binding = env3_6;
|
|
value = env3_0(env3_1[8]);
|
|
r18 = binding ? value.SPAN_ORIGIN_MANUAL_APP_START : value.SPAN_ORIGIN_AUTO_APP_START;
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
data = trace.data;
|
|
data[env3_0(env3_1[1]).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = r18;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
trace.origin = r18;
|
|
value = app_start_timestamp_ms / 1000;
|
|
binding.start_timestamp = value;
|
|
spans = binding.spans;
|
|
binding.spans = spans || [];
|
|
spans = env1_0.spans;
|
|
value11 = spans.find(_fun12910);
|
|
if (value11) {
|
|
value11.start_timestamp = value;
|
|
env3_12(env1_0, 'time_to_initial_display', value11);
|
|
}
|
|
value12 = spans.find(_fun12911);
|
|
if (value12) {
|
|
value12.start_timestamp = value;
|
|
env3_12(env1_0, 'time_to_full_display', value12);
|
|
}
|
|
value13 = r3 / 1000;
|
|
r3 = env1_0.timestamp && env1_0.timestamp < value13;
|
|
if (r3) {
|
|
env3_0(env3_1[1]).debug.log('[AppStart] Transaction event timestamp is before app start end. Adjusting transaction event timestamp.');
|
|
env1_0.timestamp = value13;
|
|
}
|
|
type = value6.type;
|
|
r22 = type === 'cold' ? env3_0(env3_1[5]).APP_START_COLD : env3_0(env3_1[5]).APP_START_WARM;
|
|
binding = env3_0;
|
|
value15 = binding(env3_1[6]);
|
|
createSpanJSON = value15.createSpanJSON;
|
|
object = {op: r22};
|
|
type = value6.type;
|
|
r22 = type !== 'cold' ? 'Warm Start' : 'Cold Start';
|
|
object.description = r22;
|
|
object.start_timestamp = value;
|
|
object.timestamp = value13;
|
|
binding = env1_0;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
object.trace_id = trace.trace_id;
|
|
contexts = binding.contexts;
|
|
trace = contexts.trace;
|
|
object.parent_span_id = trace.span_id;
|
|
object.origin = r18;
|
|
value = Reflect.apply(createSpanJSON, value15, [object]);
|
|
endFrames = env3_5 == null ? value4 : env3_5.endFrames;
|
|
if (endFrames) {
|
|
endFrames = env3_5.endFrames;
|
|
totalFrames = endFrames.totalFrames;
|
|
if (totalFrames <= 0) {
|
|
slowFrames = endFrames.slowFrames;
|
|
if (slowFrames <= 0) {
|
|
totalFrames = endFrames.totalFrames;
|
|
if (totalFrames <= 0) {
|
|
debug = env3_0(env3_1[1]).debug;
|
|
debug.warn('[AppStart] Detected zero slow or frozen frames. Not adding measurements to spanId (' + value.span_id + ').');
|
|
} else {
|
|
data = value.data;
|
|
value.data = data || ({});
|
|
data = value.data;
|
|
totalFrames = endFrames.totalFrames;
|
|
data['frames.total'] = totalFrames;
|
|
data = value.data;
|
|
slowFrames = endFrames.slowFrames;
|
|
data['frames.slow'] = slowFrames;
|
|
data = value.data;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
data['frames.frozen'] = frozenFrames;
|
|
debug = env3_0(env3_1[1]).debug;
|
|
log = debug.log;
|
|
totalFrames = endFrames.totalFrames;
|
|
slowFrames = endFrames.slowFrames;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Attached frame data to span.',
|
|
{spanId: value.span_id,
|
|
frameData: {total: totalFrames,
|
|
slow: slowFrames,
|
|
frozen: frozenFrames}}]);
|
|
}
|
|
} else {
|
|
data = value.data;
|
|
value.data = data || ({});
|
|
data = value.data;
|
|
totalFrames = endFrames.totalFrames;
|
|
data['frames.total'] = totalFrames;
|
|
data = value.data;
|
|
slowFrames = endFrames.slowFrames;
|
|
data['frames.slow'] = slowFrames;
|
|
data = value.data;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
data['frames.frozen'] = frozenFrames;
|
|
debug = env3_0(env3_1[1]).debug;
|
|
log = debug.log;
|
|
totalFrames = endFrames.totalFrames;
|
|
slowFrames = endFrames.slowFrames;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Attached frame data to span.',
|
|
{spanId: value.span_id,
|
|
frameData: {total: totalFrames, slow: slowFrames,
|
|
frozen: frozenFrames}}]);
|
|
}
|
|
} else {
|
|
data = value.data;
|
|
value.data = data || ({});
|
|
data = value.data;
|
|
totalFrames = endFrames.totalFrames;
|
|
data['frames.total'] = totalFrames;
|
|
data = value.data;
|
|
slowFrames = endFrames.slowFrames;
|
|
data['frames.slow'] = slowFrames;
|
|
data = value.data;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
data['frames.frozen'] = frozenFrames;
|
|
debug = env3_0(env3_1[1]).debug;
|
|
log = debug.log;
|
|
totalFrames = endFrames.totalFrames;
|
|
slowFrames = endFrames.slowFrames;
|
|
frozenFrames = endFrames.frozenFrames;
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Attached frame data to span.',
|
|
{spanId: value.span_id,
|
|
frameData: {total: totalFrames, slow: slowFrames,
|
|
frozen: frozenFrames}}]);
|
|
}
|
|
}
|
|
binding = env3_7;
|
|
bundleStartTimestampMs = env3_0(env3_1[6]).getBundleStartTimestampMs();
|
|
if (bundleStartTimestampMs) {
|
|
value20 = bundleStartTimestampMs / 1000;
|
|
if (value20 < value.start_timestamp) {
|
|
env3_0(env3_1[1]).debug.warn('Bundle start timestamp is before the app start span start timestamp. Skipping JS execution span.');
|
|
r17 = value4;
|
|
} else {
|
|
binding7 = env3_0;
|
|
binding8 = env3_1;
|
|
if (binding) {
|
|
value22 = binding7(binding8[6]);
|
|
createChildSpanJSON = value22.createChildSpanJSON;
|
|
object = {description: 'JS Bundle Execution Before React Root',
|
|
|
|
|
|
start_timestamp: value20,
|
|
timestamp: binding / 1000};
|
|
binding = env3_8;
|
|
value23 = env3_0(env3_1[8]);
|
|
object.origin = binding ? value23.SPAN_ORIGIN_MANUAL_APP_START : value23.SPAN_ORIGIN_AUTO_APP_START;
|
|
r17 = Reflect.apply(createChildSpanJSON, value22,
|
|
[value,
|
|
object]);
|
|
} else {
|
|
binding7(binding8[1]).debug.warn('Missing the root component first constructor call timestamp.');
|
|
value21 = binding7(binding8[6]);
|
|
createChildSpanJSON = value21.createChildSpanJSON;
|
|
object = {description: 'JS Bundle Execution Start',
|
|
start_timestamp: value20,
|
|
timestamp: value20};
|
|
object.origin = binding7(binding8[8]).SPAN_ORIGIN_AUTO_APP_START;
|
|
r17 = Reflect.apply(createChildSpanJSON, value21,
|
|
[value,
|
|
object]);
|
|
}
|
|
}
|
|
} else {
|
|
r17 = value4;
|
|
}
|
|
object = [value];
|
|
concat = object.concat;
|
|
binding = env3_2;
|
|
r3 = r17 ? [r17] : [];
|
|
value24 = binding(r3);
|
|
binding = env3_2;
|
|
value = Reflect.apply(concat, object, [value24,
|
|
binding(convertNativeSpansToSpanJSON(value,
|
|
value6.spans))]);
|
|
spans.push.apply(spans, binding(value));
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
log = debug.log;
|
|
JSON = global.JSON;
|
|
value = JSON.stringify(value, value4, 2);
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Added app start spans to transaction event.',
|
|
value]);
|
|
type = value6.type;
|
|
r6 = type === 'cold' ? env3_0(env3_1[9]).APP_START_COLD : env3_0(env3_1[9]).APP_START_WARM;
|
|
object = {value: value10, unit: 'millisecond'};
|
|
binding = env1_0;
|
|
measurements = binding.measurements;
|
|
binding.measurements = measurements || ({});
|
|
measurements = env1_0.measurements;
|
|
measurements[r6] = object;
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
log = debug.log;
|
|
JSON = global.JSON;
|
|
value = JSON.stringify(object, value4, 2);
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] Added app start measurement to transaction event.',
|
|
value]);
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Javascript failed to record app start end. `_setAppStartEndData` was not called nor could the bundle start be found.');
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] App start timestamp could not be loaded from the native layer.');
|
|
}
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Failed to retrieve the app start metrics from the native layer.');
|
|
}
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
debug.warn('[AppStart] First started active root span id does not match the transaction event span id. Can not attached app start.');
|
|
return value4;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
debug.warn('[AppStart] No first started active root span id recorded. Can not attach app start.');
|
|
return value4;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
debug.warn('[AppStart] Transaction event is missing trace context. Can not attach app start.');
|
|
}
|
|
}
|
|
function convertNativeSpansToSpanJSON(a0, a1) { // fn#12912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:6308, offset: 0x00ddac2d, size: 44 bytes, params: 3, frame: 12
|
|
const env0_0 = a0;
|
|
return a1.filter(_fun12913).map(_fun12914);
|
|
function _fun12913({start_timestamp_ms}) { // fn#12913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:6368, offset: 0x00ddac59, size: 38 bytes, params: 2, frame: 2
|
|
return start_timestamp_ms / 1000 >= env0_0.start_timestamp;
|
|
}
|
|
|
|
function _fun12914(a0) { // fn#12914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:6439, offset: 0x00ddac7f, size: 439 bytes, params: 2, frame: 25
|
|
var r1;
|
|
var r0;
|
|
var value;
|
|
var binding;
|
|
var binding2;
|
|
var setMainThreadInfo;
|
|
var value2;
|
|
var createChildSpanJSON;
|
|
var binding3;
|
|
var object;
|
|
var binding4;
|
|
var value4;
|
|
var binding5;
|
|
var bundleStartTimestampMs;
|
|
var binding6;
|
|
var binding7;
|
|
if (a0.description === 'UIKit init') {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env5_0;
|
|
binding4 = env5_1;
|
|
value4 = binding(binding4[10]);
|
|
setMainThreadInfo = value4.setMainThreadInfo;
|
|
binding5 = env0_0;
|
|
bundleStartTimestampMs = binding(binding4[6]).getBundleStartTimestampMs();
|
|
if (bundleStartTimestampMs) {
|
|
if (bundleStartTimestampMs < a0.end_timestamp_ms) {
|
|
binding = env5_0;
|
|
binding7 = env5_1;
|
|
value = binding(binding7[6]);
|
|
createChildSpanJSON = value.createChildSpanJSON;
|
|
object = {description: 'UIKit Init to JS Exec Start'};
|
|
object.start_timestamp = a0.start_timestamp_ms / 1000;
|
|
object.timestamp = bundleStartTimestampMs / 1000;
|
|
object.origin = binding(binding7[8]).SPAN_ORIGIN_AUTO_APP_START;
|
|
value = Reflect.apply(createChildSpanJSON, value, [binding5, object]);
|
|
r1 = value;
|
|
} else {
|
|
binding = env5_0;
|
|
binding6 = env5_1;
|
|
value = binding(binding6[6]);
|
|
createChildSpanJSON = value.createChildSpanJSON;
|
|
object = {description: 'UIKit Init'};
|
|
object.start_timestamp = a0.start_timestamp_ms / 1000;
|
|
object.timestamp = a0.end_timestamp_ms / 1000;
|
|
object.origin = binding(binding6[8]).SPAN_ORIGIN_AUTO_APP_START;
|
|
value = Reflect.apply(createChildSpanJSON, value, [binding5, object]);
|
|
r1 = value;
|
|
}
|
|
} else {
|
|
binding = env5_0;
|
|
binding6 = env5_1;
|
|
value = binding(binding6[6]);
|
|
createChildSpanJSON = value.createChildSpanJSON;
|
|
object = {description: 'UIKit Init'};
|
|
object.start_timestamp = a0.start_timestamp_ms / 1000;
|
|
object.timestamp = a0.end_timestamp_ms / 1000;
|
|
object.origin = binding(binding6[8]).SPAN_ORIGIN_AUTO_APP_START;
|
|
value = Reflect.apply(createChildSpanJSON, value, [binding5, object]);
|
|
r1 = value;
|
|
}
|
|
value = Reflect.apply(setMainThreadInfo, value4, [r1]);
|
|
r0 = value;
|
|
} else {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env5_0;
|
|
binding2 = env5_1;
|
|
value = binding(binding2[10]);
|
|
setMainThreadInfo = value.setMainThreadInfo;
|
|
value2 = binding(binding2[6]);
|
|
createChildSpanJSON = value2.createChildSpanJSON;
|
|
binding3 = env0_0;
|
|
object = {};
|
|
object.description = a0.description;
|
|
object.start_timestamp = a0.start_timestamp_ms / 1000;
|
|
object.timestamp = a0.end_timestamp_ms / 1000;
|
|
object.origin = binding(binding2[8]).SPAN_ORIGIN_AUTO_APP_START;
|
|
value = Reflect.apply(setMainThreadInfo, value, [Reflect.apply(createChildSpanJSON, value2, [binding3,
|
|
object])]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function recordFirstStartedActiveRootSpanId(a0) { // fn#12915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:2475, owner: appStartIntegration.recordFirstStartedActiveRootSpanId, offset: 0x00ddae36, size: 81 bytes, params: 2, frame: 13
|
|
var value2;
|
|
var moduleValue;
|
|
if (!env0_5) {
|
|
value2 = environment.__proto__;
|
|
moduleValue = require(1130) /* metro dependency 1130 */;
|
|
if (moduleValue.isRootSpan(a0)) {
|
|
setFirstStartedActiveRootSpanId(a0.spanContext().spanId);
|
|
}
|
|
}
|
|
}
|
|
|
|
function appStartIntegrationSetup(a0) { // fn#12917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:8179, owner: appStartIntegration.setup, offset: 0x00ddaec8, size: 108 bytes, params: 2, frame: 14
|
|
var value2;
|
|
env0_1 = a0;
|
|
const getOptions = a0.getOptions;
|
|
if (!Reflect.apply(getOptions, a0, []).enableAppStartTracking) {
|
|
value2 = environment.__proto__;
|
|
(require(826) /* metro dependency 826 */).debug.warn('[AppStart] App start tracking is disabled.');
|
|
}
|
|
a0.on('spanStart', recordFirstStartedActiveRootSpanId);
|
|
}
|
|
|
|
function appStartIntegrationAfterAllSetup(a0) { // fn#12918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:8347, owner: appStartIntegration.afterAllSetup, offset: 0x00ddaf34, size: 93 bytes, params: 2, frame: 12
|
|
var environment;
|
|
var value;
|
|
if (!env0_4) {
|
|
value = environment.__proto__;
|
|
value = require(1161) /* metro dependency 1161 */;
|
|
value = value.getAppRegistryIntegration(a0);
|
|
if (!(value === null || value === undefined)) {
|
|
value.onRunApplication(_fun12919);
|
|
}
|
|
}
|
|
function _fun12919() { // fn#12919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:8469, offset: 0x00ddaf91, size: 83 bytes, params: 1, frame: 13
|
|
const binding = env1_3;
|
|
const debug = (Module00826Module).debug;
|
|
const log = debug.log;
|
|
if (binding) {
|
|
Reflect.apply(log, debug,
|
|
['[AppStartIntegration] Resetting app start data flushed flag based on runApplication call.']);
|
|
} else {
|
|
Reflect.apply(log, debug,
|
|
['[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call.']);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function appStartIntegrationProcessEvent(a0) { // fn#12920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:8757, owner: appStartIntegration.processEvent, offset: 0x00ddafe4, size: 35 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
return env1_3(undefined, undefined, undefined, _fun12922);
|
|
function* _fun12922() { // fn#12922, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:8813, offset: 0x00ddb010, size: 94 bytes, params: 1, frame: 13
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_2;
|
|
let r2 = binding ? require : !binding;
|
|
r2 = !r2 ? env1_0.type !== 'transaction' : r2;
|
|
if (!r2) {
|
|
binding = env2_8;
|
|
value = environment.__proto__;
|
|
yield binding(env1_0);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
}
|
|
value = environment.__proto__;
|
|
return env1_0;
|
|
}
|
|
|
|
}
|
|
|
|
function captureStandaloneAppStart() { // fn#12923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:8938, owner: appStartIntegration.captureStandaloneAppStart, offset: 0x00ddb06e, size: 29 bytes, params: 1, frame: 15
|
|
return env1_3(this, undefined, undefined, _fun12925);
|
|
function* _fun12925() { // fn#12925, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:9004, offset: 0x00ddb094, size: 779 bytes, params: 1, frame: 22
|
|
var endFrames;
|
|
var timestampMs;
|
|
var r5;
|
|
var r4;
|
|
var value4;
|
|
var binding;
|
|
var debug;
|
|
var log;
|
|
var NATIVE;
|
|
var enableNative;
|
|
var binding2;
|
|
var property;
|
|
var value5;
|
|
var fetchNativeFrames;
|
|
var nativeFrames;
|
|
var value6;
|
|
var value7;
|
|
var binding3;
|
|
var value8;
|
|
var value9;
|
|
var binding4;
|
|
var value10;
|
|
var timestampInSeconds;
|
|
var value11;
|
|
var value12;
|
|
var object;
|
|
var error;
|
|
var binding5;
|
|
var value13;
|
|
var startInactiveSpan;
|
|
var UI_LOAD;
|
|
var value14;
|
|
var SentryNonRecordingSpan;
|
|
var binding6;
|
|
var value15;
|
|
var setEndTimeValue;
|
|
var value16;
|
|
var value18;
|
|
var spans;
|
|
var length;
|
|
var value21;
|
|
var getCapturedScopesOnSpan;
|
|
var scope;
|
|
var value22;
|
|
var getCurrentScope;
|
|
var value23;
|
|
var captureEvent;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
if (dependencyMap) {
|
|
value4 = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
log = debug.log;
|
|
if (require) {
|
|
Reflect.apply(log, debug, ['[AppStart] App start tracking standalone root span (transaction).']);
|
|
reducibleJoin7: while (true) {
|
|
if (env3_5 == null) {
|
|
endFrames = value;
|
|
break reducibleJoin7;
|
|
}
|
|
endFrames = env3_5.endFrames;
|
|
break reducibleJoin7;
|
|
}
|
|
reducibleJoin51: while (true) {
|
|
reduciblePort50: while (true) {
|
|
exceptionLanding49: while (true) {
|
|
if (endFrames) {
|
|
break reduciblePort50;
|
|
}
|
|
binding = env3_0;
|
|
NATIVE = binding(env3_1[2]).NATIVE;
|
|
enableNative = NATIVE.enableNative;
|
|
if (enableNative) {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding2 = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding2[2];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
NATIVE = value5.NATIVE;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
fetchNativeFrames = NATIVE.fetchNativeFrames;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
nativeFrames = Reflect.apply(fetchNativeFrames, NATIVE, []);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
yield nativeFrames;
|
|
try {
|
|
value6 = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
if (value7) {
|
|
return value6;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding3 = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding3[1];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value8 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
debug = value8.debug;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
log = debug.log;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
Reflect.apply(log, debug, ['[AppStart] Captured end frames for standalone app start.',
|
|
value6]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env3_5;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value9 = binding == null;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
reducibleJoin33: while (true) {
|
|
if (value9) {
|
|
timestampMs = value;
|
|
break reducibleJoin33;
|
|
}
|
|
try {
|
|
binding = env3_5;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
timestampMs = binding.timestampMs;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
break reducibleJoin33;
|
|
}
|
|
reducibleJoin42: while (true) {
|
|
if (timestampMs) {
|
|
r5 = timestampMs;
|
|
break reducibleJoin42;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding4 = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding4[1];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value10 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
timestampInSeconds = value10.timestampInSeconds;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value11 = Reflect.apply(timestampInSeconds, value10, []);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value12 = 1000 * value11;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
r5 = value12;
|
|
break reducibleJoin42;
|
|
}
|
|
try {
|
|
binding = env3_9;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.timestampMs = r5;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.endFrames = value6;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding(object);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
break reduciblePort50;
|
|
}
|
|
break reduciblePort50;
|
|
}
|
|
binding = env3_0;
|
|
debug = binding(env3_1[1]).debug;
|
|
log = debug.log;
|
|
Reflect.apply(log, debug, ['[AppStart] Failed to capture frames for standalone app start.', error]);
|
|
break reduciblePort50;
|
|
}
|
|
binding = env3_0;
|
|
binding5 = env3_1;
|
|
value13 = binding(binding5[1]);
|
|
startInactiveSpan = value13.startInactiveSpan;
|
|
UI_LOAD = binding(binding5[5]).UI_LOAD;
|
|
value14 = Reflect.apply(startInactiveSpan, value13, [{'forceTransaction': true, 'name': 'App Start',
|
|
op: UI_LOAD}]);
|
|
SentryNonRecordingSpan = binding(binding5[1]).SentryNonRecordingSpan;
|
|
if (!(value14 instanceof SentryNonRecordingSpan)) {
|
|
break reducibleJoin51;
|
|
}
|
|
return value;
|
|
}
|
|
binding = env3_0;
|
|
binding6 = env3_1;
|
|
value15 = binding(binding6[4]);
|
|
setEndTimeValue = value15.setEndTimeValue;
|
|
value16 = binding(binding6[1]);
|
|
timestampInSeconds = value16.timestampInSeconds;
|
|
Reflect.apply(setEndTimeValue, value15, [value14, Reflect.apply(timestampInSeconds, value16, [])]);
|
|
dependencyMap.emit('spanEnd', value14);
|
|
value18 = binding(binding6[4]).convertSpanToTransaction(value14);
|
|
if (value18) {
|
|
yield env2_8(value18);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
spans = value18.spans;
|
|
reducibleJoin61: while (true) {
|
|
if (spans) {
|
|
spans = value18.spans;
|
|
length = spans.length;
|
|
if (length === 0) {
|
|
break reducibleJoin61;
|
|
}
|
|
binding = env3_0;
|
|
value21 = binding(env3_1[1]);
|
|
getCapturedScopesOnSpan = value21.getCapturedScopesOnSpan;
|
|
scope = Reflect.apply(getCapturedScopesOnSpan, value21, [value14]).scope;
|
|
reducibleJoin59: while (true) {
|
|
if (scope) {
|
|
r4 = scope;
|
|
break reducibleJoin59;
|
|
}
|
|
binding = env3_0;
|
|
value22 = binding(env3_1[1]);
|
|
getCurrentScope = value22.getCurrentScope;
|
|
value23 = Reflect.apply(getCurrentScope, value22, []);
|
|
r4 = value23;
|
|
break reducibleJoin59;
|
|
}
|
|
captureEvent = r4.captureEvent;
|
|
Reflect.apply(captureEvent, r4, [value18]);
|
|
break reducibleJoin61;
|
|
}
|
|
break reducibleJoin61;
|
|
}
|
|
} else {
|
|
env3_0(env3_1[1]).debug.warn('[AppStart] Failed to convert App Start span to transaction.');
|
|
}
|
|
} else {
|
|
Reflect.apply(log, debug,
|
|
['[AppStart] App start tracking is enabled. App start will be added to the first transaction as a child span.']);
|
|
}
|
|
} else {
|
|
global.console.warn('[AppStart] Could not capture App Start, missing client, call `Sentry.init` first.');
|
|
}
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun12910({op}) { // fn#12910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:4251, offset: 0x00ddac05, size: 20 bytes, params: 2, frame: 2
|
|
return op === 'ui.load.initial_display';
|
|
}
|
|
|
|
function _fun12911({op}) { // fn#12911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1287:4422, offset: 0x00ddac19, size: 20 bytes, params: 2, frame: 2
|
|
return op === 'ui.load.full_display';
|
|
}
|
|
|
|
global.__d(_fun12889, 1160, [65, 826, 1009, 1161, 1130, 1163, 1164, 1165, 1166, 1167,
|
|
1168]) /* metro module 1160, dependencies: [65, 826, 1009, 1161, 1130, 1163, 1164, 1165, 1166, 1167, 1168] */;
|