422 lines
19 KiB
React
422 lines
19 KiB
React
/* Metro module 868; source: unknown; dependencies: [65, 77, 6, 7, 838, 847, 848, 828, 869, 870, 832, 833, 857, 871, 829, 865] */
|
|
function _fun9323(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:6, offset: 0x00d633f7, size: 176 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const isSpanTimeInput = 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 = function(a0) {
|
|
return !!(a0.start_timestamp && a0.timestamp && a0.span_id && a0.trace_id);
|
|
};
|
|
const env0_2 = require(65) /* metro dependency 65 */;
|
|
const env0_3 = require(77) /* metro dependency 77 */;
|
|
const env0_4 = require(6) /* metro dependency 6 */;
|
|
const env0_5 = require(7) /* metro dependency 7 */;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.SentrySpan = _fun9327();
|
|
}
|
|
|
|
function isStandaloneSpan(a0) { // fn#9326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:5940, offset: 0x00d6350d, size: 29 bytes, params: 2, frame: 10
|
|
return a0 instanceof env0_6 && a0.isStandaloneSpan();
|
|
}
|
|
|
|
function _fun9327() { // fn#9327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:142, offset: 0x00d6352a, size: 406 bytes, params: 1, frame: 15
|
|
return env0_5(SentrySpan, [{key: 'addLink', value: function(a0) {
|
|
if (this._links) {
|
|
this._links.push(a0);
|
|
} else {
|
|
this._links = [a0];
|
|
}
|
|
return this;
|
|
}}, {key: 'addLinks', value: value_9330}, {key: 'recordException', value: function(a0, a1) {
|
|
}}, {key: 'spanContext', value: value_9332}, {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(_fun9335);
|
|
return this;
|
|
}}, {key: 'updateStartTime', value: value_9336}, {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[6]).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE;
|
|
this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'custom');
|
|
return this;
|
|
}}, {key: 'end', value: value_9339}, {key: 'getSpanJSON', value: value_9340}, {key: 'isRecording',
|
|
value: function() {
|
|
return !this._endTime && !!this._sampled;
|
|
}}, {key: 'addEvent', value: value_9342}, {key: 'isStandaloneSpan', value: function() {
|
|
return !!this._isStandaloneSpan;
|
|
}}, {key: '_onSpanEnded', value: value_9344}, {key: '_convertSpanToTransaction', value: value_9345}]);
|
|
}
|
|
|
|
function SentrySpan() { // fn#9328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:176, offset: 0x00d636c0, size: 432 bytes, params: 1, frame: 23
|
|
const r1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
let value = environment.__proto__;
|
|
let binding = env1_4;
|
|
binding(this, SentrySpan);
|
|
this._traceId = r1.traceId || (require(838) /* metro dependency 838 */).generateTraceId();
|
|
this._spanId = r1.spanId || (require(838) /* metro dependency 838 */).generateSpanId();
|
|
this._startTime = r1.startTimestamp || (require(847) /* metro dependency 847 */).timestampInSeconds();
|
|
this._links = r1.links;
|
|
this._attributes = {};
|
|
const setAttributes = this.setAttributes;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
binding = env1_3;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
value = binding({}, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'manual');
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_OP = (require(848) /* metro dependency 848 */).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_9330(a0) { // fn#9330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1007, offset: 0x00d638a1, size: 61 bytes, params: 2, frame: 16
|
|
var push;
|
|
var apply;
|
|
var value;
|
|
let _links = this._links;
|
|
if (_links) {
|
|
_links = this._links;
|
|
push = _links.push;
|
|
apply = push.apply;
|
|
value = environment.__proto__;
|
|
Reflect.apply(apply, push, [_links, env1_2(a0)]);
|
|
} else {
|
|
this._links = a0;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
function value_9332() { // fn#9332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1196, offset: 0x00d638de, 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(828) /* metro dependency 828 */;
|
|
object2.traceFlags = _sampled ? value.TRACE_FLAG_SAMPLED : value.TRACE_FLAG_NONE;
|
|
return object2;
|
|
}
|
|
|
|
function value_9334(a0) { // fn#9334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1501, offset: 0x00d63957, size: 51 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const Object = global.Object;
|
|
Object.keys(a0).forEach(_fun9335);
|
|
return this;
|
|
}
|
|
|
|
function value_9336(a0) { // fn#9336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1650, offset: 0x00d639aa, size: 50 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__;
|
|
value = require(828) /* metro dependency 828 */;
|
|
value = value.spanTimeInputToSeconds(a0);
|
|
this._startTime = value;
|
|
}
|
|
|
|
function value_9339(a0) { // fn#9339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:1964, offset: 0x00d63a27, size: 94 bytes, params: 2, frame: 15
|
|
var value;
|
|
if (!this._endTime) {
|
|
value = environment.__proto__;
|
|
value = require(828) /* metro dependency 828 */;
|
|
this._endTime = value.spanTimeInputToSeconds(a0);
|
|
value = require(869) /* metro dependency 869 */;
|
|
value.logSpanEnd(this);
|
|
this._onSpanEnded();
|
|
}
|
|
}
|
|
|
|
function value_9340() { // fn#9340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:2117, offset: 0x00d63a85, size: 434 bytes, params: 1, frame: 19
|
|
var r3;
|
|
var spanId;
|
|
var moduleValue3;
|
|
var rootSpan;
|
|
const object2 = {};
|
|
let _attributes = this._attributes;
|
|
object2.data = _attributes;
|
|
object2.description = this._name;
|
|
_attributes = this._attributes;
|
|
let value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_OP = (require(848) /* metro dependency 848 */).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(828) /* metro dependency 828 */).getStatusMessage(this._status);
|
|
object2.timestamp = this._endTime;
|
|
object2.trace_id = this._traceId;
|
|
_attributes = this._attributes;
|
|
const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = (require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN;
|
|
object2.origin = _attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN];
|
|
_attributes = this._attributes;
|
|
const SEMANTIC_ATTRIBUTE_PROFILE_ID = (require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_PROFILE_ID;
|
|
object2.profile_id = _attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID];
|
|
_attributes = this._attributes;
|
|
const SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME = (require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME;
|
|
object2.exclusive_time = _attributes[SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME];
|
|
const moduleValue2 = require(870) /* metro dependency 870 */;
|
|
object2.measurements = moduleValue2.timedEventsToMeasurements(this._events);
|
|
const _isStandaloneSpan = this._isStandaloneSpan;
|
|
if (_isStandaloneSpan) {
|
|
moduleValue3 = require(828) /* metro dependency 828 */;
|
|
r3 = moduleValue3.getRootSpan(this) === this;
|
|
} else {
|
|
r3 = _isStandaloneSpan;
|
|
}
|
|
r3 = !r3 ? value2 : r3;
|
|
object2.is_segment = r3;
|
|
if (this._isStandaloneSpan) {
|
|
rootSpan = (require(828) /* metro dependency 828 */).getRootSpan(this);
|
|
spanId = rootSpan.spanContext().spanId;
|
|
} else {
|
|
spanId = value2;
|
|
}
|
|
object2.segment_id = spanId;
|
|
value = require(828) /* metro dependency 828 */;
|
|
object2.links = value.convertSpanLinksForEnvelope(this._links);
|
|
return object2;
|
|
}
|
|
|
|
function value_9342(a0, a1, a2) { // fn#9342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:3031, offset: 0x00d63c54, size: 227 bytes, params: 4, frame: 19
|
|
const value = a1;
|
|
const value2 = a2;
|
|
if ((require(832) /* metro dependency 832 */).DEBUG_BUILD) {
|
|
(require(833) /* metro dependency 833 */).debug.log('[Tracing] Adding an event to span:', a0);
|
|
}
|
|
const r5 = isSpanTimeInput(value) ? value : value2 || (require(847) /* metro dependency 847 */).timestampInSeconds();
|
|
const r1 = isSpanTimeInput(value) ? {} : value || ({});
|
|
const object2 = {name: a0};
|
|
object2.time = (require(828) /* metro dependency 828 */).spanTimeInputToSeconds(r5);
|
|
object2.attributes = r1;
|
|
this._events.push(object2);
|
|
return this;
|
|
}
|
|
|
|
function value_9344() { // fn#9344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:3441, offset: 0x00d63d48, size: 435 bytes, params: 1, frame: 18
|
|
var r3;
|
|
var moduleValue2;
|
|
var value3;
|
|
var moduleValue3;
|
|
var scope;
|
|
const DEBUG_BUILD = (require(832) /* metro dependency 832 */).DEBUG_BUILD;
|
|
const debug = (require(833) /* metro dependency 833 */).debug;
|
|
var client;
|
|
var property;
|
|
let value = environment.__proto__;
|
|
const client2 = (require(857) /* metro dependency 857 */).getClient();
|
|
if (client2) {
|
|
client2.emit('spanEnd', this);
|
|
}
|
|
if (this._isStandaloneSpan) {
|
|
if (this._isStandaloneSpan) {
|
|
if (this._sampled) {
|
|
value = require(871) /* metro dependency 871 */;
|
|
value = value.createSpanEnvelope([this], client2);
|
|
client = (require(857) /* metro dependency 857 */).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) {
|
|
debug.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(829) /* metro dependency 829 */;
|
|
scope = moduleValue3.getCapturedScopesOnSpan(this).scope;
|
|
if (scope) {
|
|
r3 = scope;
|
|
} else {
|
|
value = require(857) /* metro dependency 857 */;
|
|
value = value.getCurrentScope();
|
|
r3 = value;
|
|
}
|
|
r3.captureEvent(value3);
|
|
}
|
|
}
|
|
} else {
|
|
moduleValue2 = require(828) /* metro dependency 828 */;
|
|
if (this === moduleValue2.getRootSpan(this)) {
|
|
if (this._isStandaloneSpan) {
|
|
if (this._sampled) {
|
|
value = require(871) /* metro dependency 871 */;
|
|
value = value.createSpanEnvelope([this], client2);
|
|
client = (require(857) /* metro dependency 857 */).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) {
|
|
debug.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(829) /* metro dependency 829 */;
|
|
scope = moduleValue3.getCapturedScopesOnSpan(this).scope;
|
|
if (scope) {
|
|
r3 = scope;
|
|
} else {
|
|
value = require(857) /* metro dependency 857 */;
|
|
value = value.getCurrentScope();
|
|
r3 = value;
|
|
}
|
|
r3.captureEvent(value3);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_9345() { // fn#9345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:4190, offset: 0x00d63efb, size: 787 bytes, params: 1, frame: 27
|
|
var environment;
|
|
const DEBUG_BUILD = (require(832) /* metro dependency 832 */).DEBUG_BUILD;
|
|
const debug = (require(833) /* metro dependency 833 */).debug;
|
|
var capturedScopesOnSpan;
|
|
var scope;
|
|
var value6;
|
|
var value7;
|
|
var _attributes;
|
|
var property;
|
|
var Object;
|
|
var assign;
|
|
var object4;
|
|
var object5;
|
|
var object6;
|
|
var value10;
|
|
var moduleValue6;
|
|
var value11;
|
|
const value = environment.__proto__;
|
|
const isFullFinishedSpanBinding = isFullFinishedSpan;
|
|
const value2 = undefined;
|
|
const moduleValue = require(828) /* metro dependency 828 */;
|
|
if (isFullFinishedSpanBinding(moduleValue.spanToJSON(this))) {
|
|
if (!this._name) {
|
|
if (DEBUG_BUILD) {
|
|
debug.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');
|
|
}
|
|
this._name = '<unlabeled transaction>';
|
|
}
|
|
capturedScopesOnSpan = (require(829) /* metro dependency 829 */).getCapturedScopesOnSpan(this);
|
|
scope = capturedScopesOnSpan.scope;
|
|
if (this._sampled === true) {
|
|
value6 = moduleValue.getSpanDescendants(this).filter(_fun9346).map(_fun9347);
|
|
value7 = value6.filter(isFullFinishedSpan);
|
|
_attributes = this._attributes;
|
|
property = _attributes[(require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
_attributes = this._attributes;
|
|
delete _attributes[(require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
|
|
value7.forEach(function({data}) {
|
|
delete data[require(dependencyMap[6]).SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME];
|
|
});
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object4 = {};
|
|
object5 = {};
|
|
object5.trace = (require(828) /* metro dependency 828 */).spanToTransactionTraceContext(this);
|
|
object4.contexts = object5;
|
|
object4.spans = value7.length > 1000 ? value7.sort(_fun9349).slice(0, 1000) : value7;
|
|
object4.start_timestamp = this._startTime;
|
|
object4.timestamp = this._endTime;
|
|
object4.transaction = this._name;
|
|
object4.type = 'transaction';
|
|
object6 = {capturedSpanScope: scope, capturedSpanIsolationScope: capturedScopesOnSpan.isolationScope};
|
|
object6.dynamicSamplingContext = (require(865) /* metro dependency 865 */).getDynamicSamplingContextFromSpan(this);
|
|
object4.sdkProcessingMetadata = object6;
|
|
object4.request = scope == null || scope.getScopeData().sdkProcessingMetadata == null ? value2 : scope.getScopeData().sdkProcessingMetadata.normalizedRequest;
|
|
value10 = Reflect.apply(assign, Object, [object4, property && ({transaction_info: {source: property}})]);
|
|
moduleValue6 = require(870) /* metro dependency 870 */;
|
|
value11 = moduleValue6.timedEventsToMeasurements(this._events);
|
|
if (value11 && global.Object.keys(value11).length) {
|
|
if (DEBUG_BUILD) {
|
|
debug.log('[Measurements] Adding measurements to transaction event', global.JSON.stringify(value11,
|
|
value2,
|
|
2));
|
|
}
|
|
value10.measurements = value11;
|
|
}
|
|
return value10;
|
|
}
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function _fun9346(a0) { // fn#9346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:4684, offset: 0x00d6420e, size: 36 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = a0 !== env0_0;
|
|
if (value) {
|
|
value = environment.__proto__.__proto__;
|
|
value = !isStandaloneSpan(a0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun9347(a0) { // fn#9347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:995:4739, offset: 0x00d64232, size: 41 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (require(828) /* metro dependency 828 */).spanToJSON(a0);
|
|
}
|
|
|