432 lines
20 KiB
React
432 lines
20 KiB
React
/* Metro module 7410; source: unknown; dependencies: [77, 6, 7, 7379, 7383, 7384, 7374, 7407, 7375, 7385, 7411, 7397, 7369, 7396, 7412, 7398, 7405] */
|
|
function _fun59702(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:6, offset: 0x016f01bf, size: 148 bytes, params: 8, frame: 17
|
|
const env0_0 = require;
|
|
const isSpanTimeInput_59703 = function(a0) {
|
|
var r0;
|
|
var value = a0;
|
|
r0 = value && typeof value === 'number';
|
|
r0 = !r0 ? value instanceof global.Date : r0;
|
|
if (!r0) {
|
|
value = global.Array.isArray(value);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
const isFullFinishedSpan_59704 = function(a0) {
|
|
return !!(a0.start_timestamp && a0.timestamp && a0.span_id && a0.trace_id);
|
|
};
|
|
const env0_2 = require(77) /* metro dependency 77 */;
|
|
const env0_3 = require(6) /* metro dependency 6 */;
|
|
const env0_4 = require(7) /* metro dependency 7 */;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.SentrySpan = _fun59706();
|
|
}
|
|
|
|
function isStandaloneSpan_59705(a0) { // fn#59705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:6091, offset: 0x016f0253, size: 29 bytes, params: 2, frame: 10
|
|
return a0 instanceof env0_5 && a0.isStandaloneSpan();
|
|
}
|
|
|
|
function _fun59706() { // fn#59706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:120, offset: 0x016f0270, size: 406 bytes, params: 1, frame: 15
|
|
return env0_4(SentrySpan_59707, [{key: 'addLink', value: function(a0) {
|
|
return this;
|
|
}}, {key: 'addLinks', value: function(a0) {
|
|
return this;
|
|
}}, {key: 'recordException', value: function(a0, a1) {
|
|
}}, {key: 'spanContext', value: value_59711}, {key: 'setAttribute', value: function(a0, a1) {
|
|
if (a1 === undefined) {
|
|
delete this._attributes[a0];
|
|
} else {
|
|
this._attributes[a0] = a1;
|
|
}
|
|
return this;
|
|
}}, {key: 'setAttributes', value: function(a0) {
|
|
var env0_0 = a0;
|
|
var env0_1 = this;
|
|
var Object = global.Object;
|
|
Object.keys(a0).forEach(_fun59714);
|
|
return this;
|
|
}}, {key: 'updateStartTime', value: value_59715}, {key: 'setStatus', value: function(a0) {
|
|
this._status = a0;
|
|
return this;
|
|
}}, {key: 'updateName', value: function(a0) {
|
|
this._name = a0;
|
|
var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = require(dependencyMap[5]).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');
|
|
return this;
|
|
}}, {key: 'end', value: value_59718}, {key: 'getSpanJSON', value: value_59719}, {key: 'isRecording',
|
|
value: function() {
|
|
return !this._endTime && !!this._sampled;
|
|
}}, {key: 'addEvent', value: value_59721}, {key: 'isStandaloneSpan', value: function() {
|
|
return !!this._isStandaloneSpan;
|
|
}}, {key: '_onSpanEnded', value: value_59723}, {key: '_convertSpanToTransaction', value: value_59724}]);
|
|
}
|
|
|
|
function SentrySpan_59707() { // fn#59707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:154, offset: 0x016f0406, size: 420 bytes, params: 1, frame: 23
|
|
const r1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
let value = environment.__proto__;
|
|
let binding = env1_3;
|
|
binding(this, SentrySpan_59707);
|
|
this._traceId = r1.traceId || (require(7379) /* metro dependency 7379 */).generateTraceId();
|
|
this._spanId = r1.spanId || (require(7379) /* metro dependency 7379 */).generateSpanId();
|
|
this._startTime = r1.startTimestamp || (require(7383) /* metro dependency 7383 */).timestampInSeconds();
|
|
this._attributes = {};
|
|
const setAttributes = this.setAttributes;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
binding = env1_2;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
value = binding({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'manual');
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_OP = (require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
value = binding(value, SEMANTIC_ATTRIBUTE_SENTRY_OP, r1.op);
|
|
Reflect.apply(setAttributes, this, [Reflect.apply(assign, Object, [value, r1.attributes])]);
|
|
this._name = r1.name;
|
|
if (r1.parentSpanId) {
|
|
this._parentSpanId = r1.parentSpanId;
|
|
}
|
|
if ('sampled' in r1) {
|
|
this._sampled = r1.sampled;
|
|
}
|
|
if (r1.endTimestamp) {
|
|
this._endTime = r1.endTimestamp;
|
|
}
|
|
this._events = [];
|
|
this._isStandaloneSpan = r1.isStandalone;
|
|
if (this._endTime) {
|
|
this._onSpanEnded();
|
|
}
|
|
}
|
|
|
|
function value_59711() { // fn#59711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:1039, offset: 0x016f05aa, size: 82 bytes, params: 1, frame: 13
|
|
const object2 = {};
|
|
object2.spanId = this._spanId;
|
|
object2.traceId = this._traceId;
|
|
const _sampled = this._sampled;
|
|
let value = environment.__proto__;
|
|
value = require(7374) /* metro dependency 7374 */;
|
|
object2.traceFlags = _sampled ? value.TRACE_FLAG_SAMPLED : value.TRACE_FLAG_NONE;
|
|
return object2;
|
|
}
|
|
|
|
function value_59713(a0) { // fn#59713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:1344, offset: 0x016f05fc, size: 51 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const Object = global.Object;
|
|
Object.keys(a0).forEach(_fun59714);
|
|
return this;
|
|
}
|
|
|
|
function value_59715(a0) { // fn#59715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:1493, offset: 0x016f062f, size: 50 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__;
|
|
value = require(7374) /* metro dependency 7374 */;
|
|
value = value.spanTimeInputToSeconds(a0);
|
|
this._startTime = value;
|
|
}
|
|
|
|
function value_59718(a0) { // fn#59718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:1807, offset: 0x016f069e, size: 94 bytes, params: 2, frame: 15
|
|
var value;
|
|
if (!this._endTime) {
|
|
value = environment.__proto__;
|
|
value = require(7374) /* metro dependency 7374 */;
|
|
this._endTime = value.spanTimeInputToSeconds(a0);
|
|
value = require(7407) /* metro dependency 7407 */;
|
|
value.logSpanEnd(this);
|
|
this._onSpanEnded();
|
|
}
|
|
}
|
|
|
|
function value_59719() { // fn#59719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:1960, offset: 0x016f06fc, size: 446 bytes, params: 1, frame: 21
|
|
var r3;
|
|
var spanId;
|
|
var moduleValue5;
|
|
let value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const moduleValue = require(7375) /* metro dependency 7375 */;
|
|
const dropUndefinedKeys = moduleValue.dropUndefinedKeys;
|
|
const object2 = {};
|
|
let _attributes = this._attributes;
|
|
object2.data = _attributes;
|
|
object2.description = this._name;
|
|
_attributes = this._attributes;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_OP = (require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_OP;
|
|
object2.op = _attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP];
|
|
object2.parent_span_id = this._parentSpanId;
|
|
object2.span_id = this._spanId;
|
|
object2.start_timestamp = this._startTime;
|
|
object2.status = (require(7374) /* metro dependency 7374 */).getStatusMessage(this._status);
|
|
object2.timestamp = this._endTime;
|
|
object2.trace_id = this._traceId;
|
|
_attributes = this._attributes;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
object2.origin = _attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];
|
|
object2._metrics_summary = (require(7385) /* metro dependency 7385 */).getMetricSummaryJsonForSpan(this);
|
|
_attributes = this._attributes;
|
|
const SEMANTIC_ATTRIBUTE_PROFILE_ID = (require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_PROFILE_ID;
|
|
object2.profile_id = _attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID];
|
|
_attributes = this._attributes;
|
|
const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = (require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME;
|
|
object2.exclusive_time = _attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME];
|
|
const moduleValue4 = require(7411) /* metro dependency 7411 */;
|
|
object2.measurements = moduleValue4.timedEventsToMeasurements(this._events);
|
|
const _isStandaloneSpan = this._isStandaloneSpan;
|
|
if (_isStandaloneSpan) {
|
|
moduleValue5 = require(7374) /* metro dependency 7374 */;
|
|
r3 = moduleValue5.getRootSpan(this) === this;
|
|
} else {
|
|
r3 = _isStandaloneSpan;
|
|
}
|
|
r3 = !r3 ? value2 : r3;
|
|
object2.is_segment = r3;
|
|
if (this._isStandaloneSpan) {
|
|
value = require(7374) /* metro dependency 7374 */;
|
|
value = value.getRootSpan(this);
|
|
spanId = value.spanContext().spanId;
|
|
} else {
|
|
spanId = value2;
|
|
}
|
|
object2.segment_id = spanId;
|
|
return Reflect.apply(dropUndefinedKeys, moduleValue, [object2]);
|
|
}
|
|
|
|
function value_59721(a0, a1, a2) { // fn#59721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:2907, offset: 0x016f08ba, size: 227 bytes, params: 4, frame: 19
|
|
const value = a1;
|
|
const value2 = a2;
|
|
if ((require(7397) /* metro dependency 7397 */).DEBUG_BUILD) {
|
|
(require(7369) /* metro dependency 7369 */).logger.log('[Tracing] Adding an event to span:', a0);
|
|
}
|
|
const r5 = isSpanTimeInput_59703(value) ? value : value2 || (require(7383) /* metro dependency 7383 */).timestampInSeconds();
|
|
const r1 = isSpanTimeInput_59703(value) ? {} : value || ({});
|
|
const object2 = {name: a0};
|
|
object2.time = (require(7374) /* metro dependency 7374 */).spanTimeInputToSeconds(r5);
|
|
object2.attributes = r1;
|
|
this._events.push(object2);
|
|
return this;
|
|
}
|
|
|
|
function value_59723() { // fn#59723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:3318, offset: 0x016f099d, size: 435 bytes, params: 1, frame: 18
|
|
var r3;
|
|
var moduleValue2;
|
|
var value3;
|
|
var moduleValue3;
|
|
var scope;
|
|
const DEBUG_BUILD = (require(7397) /* metro dependency 7397 */).DEBUG_BUILD;
|
|
const logger = (require(7369) /* metro dependency 7369 */).logger;
|
|
var client;
|
|
var property;
|
|
let value = environment.__proto__;
|
|
const client2 = (require(7396) /* metro dependency 7396 */).getClient();
|
|
if (client2) {
|
|
client2.emit('spanEnd', this);
|
|
}
|
|
if (this._isStandaloneSpan) {
|
|
if (this._isStandaloneSpan) {
|
|
if (this._sampled) {
|
|
value = require(7412) /* metro dependency 7412 */;
|
|
value = value.createSpanEnvelope([this], client2);
|
|
client = (require(7396) /* metro dependency 7396 */).getClient();
|
|
if (client) {
|
|
property = value[1];
|
|
if (property) {
|
|
if (property.length === 0) {
|
|
client.recordDroppedEvent('before_send', 'span');
|
|
} else {
|
|
client.sendEnvelope(value);
|
|
}
|
|
} else {
|
|
client.recordDroppedEvent('before_send', 'span');
|
|
}
|
|
}
|
|
} else {
|
|
if (DEBUG_BUILD) {
|
|
logger.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');
|
|
}
|
|
if (client2) {
|
|
client2.recordDroppedEvent('sample_rate', 'span');
|
|
}
|
|
}
|
|
} else {
|
|
value3 = this._convertSpanToTransaction();
|
|
if (value3) {
|
|
moduleValue3 = require(7398) /* metro dependency 7398 */;
|
|
scope = moduleValue3.getCapturedScopesOnSpan(this).scope;
|
|
if (scope) {
|
|
r3 = scope;
|
|
} else {
|
|
value = require(7396) /* metro dependency 7396 */;
|
|
value = value.getCurrentScope();
|
|
r3 = value;
|
|
}
|
|
r3.captureEvent(value3);
|
|
}
|
|
}
|
|
} else {
|
|
moduleValue2 = require(7374) /* metro dependency 7374 */;
|
|
if (this === moduleValue2.getRootSpan(this)) {
|
|
if (this._isStandaloneSpan) {
|
|
if (this._sampled) {
|
|
value = require(7412) /* metro dependency 7412 */;
|
|
value = value.createSpanEnvelope([this], client2);
|
|
client = (require(7396) /* metro dependency 7396 */).getClient();
|
|
if (client) {
|
|
property = value[1];
|
|
if (property) {
|
|
if (property.length === 0) {
|
|
client.recordDroppedEvent('before_send', 'span');
|
|
} else {
|
|
client.sendEnvelope(value);
|
|
}
|
|
} else {
|
|
client.recordDroppedEvent('before_send', 'span');
|
|
}
|
|
}
|
|
} else {
|
|
if (DEBUG_BUILD) {
|
|
logger.log('[Tracing] Discarding standalone span because its trace was not chosen to be sampled.');
|
|
}
|
|
if (client2) {
|
|
client2.recordDroppedEvent('sample_rate', 'span');
|
|
}
|
|
}
|
|
} else {
|
|
value3 = this._convertSpanToTransaction();
|
|
if (value3) {
|
|
moduleValue3 = require(7398) /* metro dependency 7398 */;
|
|
scope = moduleValue3.getCapturedScopesOnSpan(this).scope;
|
|
if (scope) {
|
|
r3 = scope;
|
|
} else {
|
|
value = require(7396) /* metro dependency 7396 */;
|
|
value = value.getCurrentScope();
|
|
r3 = value;
|
|
}
|
|
r3.captureEvent(value3);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_59724() { // fn#59724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:4068, offset: 0x016f0b50, size: 991 bytes, params: 1, frame: 29
|
|
var environment;
|
|
var r4;
|
|
var _name;
|
|
const DEBUG_BUILD = (require(7397) /* metro dependency 7397 */).DEBUG_BUILD;
|
|
const logger = (require(7369) /* metro dependency 7369 */).logger;
|
|
var capturedScopesOnSpan;
|
|
var scope;
|
|
var isolationScope;
|
|
var value8;
|
|
var value9;
|
|
var _attributes;
|
|
var property;
|
|
var Object;
|
|
var assign;
|
|
var object5;
|
|
var object6;
|
|
var Object2;
|
|
var assign2;
|
|
var object7;
|
|
var moduleValue7;
|
|
var dropUndefinedKeys;
|
|
var object8;
|
|
var value12;
|
|
var moduleValue10;
|
|
var value13;
|
|
const value = environment.__proto__;
|
|
const isFullFinishedSpan_59704Binding = isFullFinishedSpan_59704;
|
|
const moduleValue = require(7374) /* metro dependency 7374 */;
|
|
if (isFullFinishedSpan_59704Binding(moduleValue.spanToJSON(this))) {
|
|
_name = this._name;
|
|
if (!_name) {
|
|
if (DEBUG_BUILD) {
|
|
logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');
|
|
}
|
|
this._name = '<unlabeled transaction>';
|
|
}
|
|
capturedScopesOnSpan = (require(7398) /* metro dependency 7398 */).getCapturedScopesOnSpan(this);
|
|
scope = capturedScopesOnSpan.scope;
|
|
isolationScope = capturedScopesOnSpan.isolationScope;
|
|
r4 = (scope || (require(7396) /* metro dependency 7396 */).getCurrentScope()).getClient() || (require(7396) /* metro dependency 7396 */).getClient();
|
|
if (this._sampled !== true) {
|
|
if (DEBUG_BUILD) {
|
|
logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');
|
|
}
|
|
if (r4) {
|
|
r4.recordDroppedEvent('sample_rate', 'transaction');
|
|
}
|
|
return undefined;
|
|
}
|
|
value8 = moduleValue.getSpanDescendants(this).filter(_fun59725).map(_fun59726);
|
|
value9 = value8.filter(isFullFinishedSpan_59704);
|
|
_attributes = this._attributes;
|
|
property = _attributes[(require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
_attributes = this._attributes;
|
|
delete _attributes[(require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
|
|
value9.forEach(_fun59727);
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object5 = {};
|
|
object6 = {};
|
|
object6.trace = (require(7374) /* metro dependency 7374 */).spanToTransactionTraceContext(this);
|
|
object5.contexts = object6;
|
|
object5.spans = value9.length > 1000 ? value9.sort(function({start_timestamp}, a1) {
|
|
return start_timestamp - a1.start_timestamp;
|
|
}).slice(0, 1000) : value9;
|
|
object5.start_timestamp = this._startTime;
|
|
object5.timestamp = this._endTime;
|
|
_name = this._name;
|
|
object5.transaction = _name;
|
|
object5.type = 'transaction';
|
|
Object2 = global.Object;
|
|
assign2 = Object2.assign;
|
|
object7 = {capturedSpanScope: scope, capturedSpanIsolationScope: isolationScope};
|
|
moduleValue7 = require(7375) /* metro dependency 7375 */;
|
|
dropUndefinedKeys = moduleValue7.dropUndefinedKeys;
|
|
object8 = {};
|
|
object8.dynamicSamplingContext = (require(7405) /* metro dependency 7405 */).getDynamicSamplingContextFromSpan(this);
|
|
object5.sdkProcessingMetadata = Reflect.apply(assign2, Object2, [object7, Reflect.apply(dropUndefinedKeys,
|
|
moduleValue7, [object8])]);
|
|
object5._metrics_summary = (require(7385) /* metro dependency 7385 */).getMetricSummaryJsonForSpan(this);
|
|
value12 = Reflect.apply(assign, Object, [object5, property && ({transaction_info: {source: property}})]);
|
|
moduleValue10 = require(7411) /* metro dependency 7411 */;
|
|
value13 = moduleValue10.timedEventsToMeasurements(this._events);
|
|
if (value13 && global.Object.keys(value13).length) {
|
|
if (DEBUG_BUILD) {
|
|
logger.log('[Measurements] Adding measurements to transaction event', global.JSON.stringify(value13,
|
|
undefined,
|
|
2));
|
|
}
|
|
value12.measurements = value13;
|
|
}
|
|
return value12;
|
|
}
|
|
}
|
|
|
|
function _fun59725(a0) { // fn#59725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:4733, offset: 0x016f0f2f, size: 36 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = a0 !== env0_0;
|
|
if (value) {
|
|
value = environment.__proto__.__proto__;
|
|
value = !isStandaloneSpan_59705(a0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun59726(a0) { // fn#59726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:4788, offset: 0x016f0f53, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (require(7374) /* metro dependency 7374 */).spanToJSON(a0);
|
|
}
|
|
|
|
function _fun59727(a0) { // fn#59727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7588:5007, offset: 0x016f0f7c, size: 55 bytes, params: 2, frame: 12
|
|
var value;
|
|
let data = a0.data;
|
|
if (data) {
|
|
data = a0.data;
|
|
value = environment.__proto__.__proto__;
|
|
delete data[(require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
|
|
}
|
|
}
|
|
|