85 lines
4.5 KiB
React
85 lines
4.5 KiB
React
/* Metro module 7405; source: unknown; dependencies: [7375, 7406, 7396, 7374, 7382, 7384, 7401] */
|
|
function _fun59688(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7583:6, offset: 0x016ef6e2, size: 128 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const closure = getDynamicSamplingContextFromClient_59689;
|
|
const closure2 = getDynamicSamplingContextFromSpan_59690;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.freezeDscOnSpan = freezeDscOnSpan_59691;
|
|
exports.getDynamicSamplingContextFromClient = closure;
|
|
exports.getDynamicSamplingContextFromScope = getDynamicSamplingContextFromScope_59692;
|
|
exports.getDynamicSamplingContextFromSpan = closure2;
|
|
exports.spanToBaggageHeader = spanToBaggageHeader_59693;
|
|
}
|
|
|
|
function getDynamicSamplingContextFromClient_59689(a0, a1) { // fn#59689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7583:98, offset: 0x016ef762, size: 155 bytes, params: 3, frame: 20
|
|
let value = a1.getOptions();
|
|
const publicKey = (a1.getDsn() || ({})).publicKey;
|
|
const moduleValue = require(7375) /* metro dependency 7375 */;
|
|
value = moduleValue.dropUndefinedKeys({environment: value.environment || (require(7406) /* metro dependency 7406 */).DEFAULT_ENVIRONMENT,
|
|
release: value.release, public_key: publicKey, trace_id: a0});
|
|
a1.emit('createDsc', value);
|
|
return value;
|
|
}
|
|
|
|
function getDynamicSamplingContextFromSpan_59690(a0) { // fn#59690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7583:357, offset: 0x016ef7fd, size: 459 bytes, params: 2, frame: 24
|
|
var r10;
|
|
var r1;
|
|
var rootSpan;
|
|
var property;
|
|
var spanContext;
|
|
var traceState;
|
|
var getDynamicSamplingContextFromClient_59689Binding;
|
|
var dynamicSamplingContextFromClient_59689Binding;
|
|
var value7;
|
|
var description;
|
|
var moduleValue5;
|
|
var String;
|
|
var value;
|
|
const client = (require(7396) /* metro dependency 7396 */).getClient();
|
|
if (client) {
|
|
rootSpan = (require(7374) /* metro dependency 7374 */).getRootSpan(a0);
|
|
property = rootSpan[env0_2];
|
|
if (property) {
|
|
return property;
|
|
}
|
|
spanContext = rootSpan.spanContext;
|
|
traceState = Reflect.apply(spanContext, rootSpan, []).traceState;
|
|
r10 = traceState && traceState.get('sentry.dsc');
|
|
r1 = r10 && (require(7382) /* metro dependency 7382 */).baggageHeaderToDynamicSamplingContext(r10);
|
|
if (r1) {
|
|
return r1;
|
|
}
|
|
getDynamicSamplingContextFromClient_59689Binding = getDynamicSamplingContextFromClient_59689;
|
|
spanContext = a0.spanContext;
|
|
dynamicSamplingContextFromClient_59689Binding = getDynamicSamplingContextFromClient_59689Binding(Reflect.apply(spanContext,
|
|
|
|
a0, []).traceId, client);
|
|
value7 = (require(7374) /* metro dependency 7374 */).spanToJSON(rootSpan);
|
|
r10 = value7.data || ({});
|
|
property = r10[(require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];
|
|
if (property != null) {
|
|
dynamicSamplingContextFromClient_59689Binding.sample_rate = '' + property;
|
|
}
|
|
property = r10[(require(7384) /* metro dependency 7384 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
description = value7.description;
|
|
if (property !== 'url' && description) {
|
|
dynamicSamplingContextFromClient_59689Binding.transaction = description;
|
|
}
|
|
moduleValue5 = require(7401) /* metro dependency 7401 */;
|
|
if (moduleValue5.hasTracingEnabled()) {
|
|
String = global.String;
|
|
value = require(7374) /* metro dependency 7374 */;
|
|
dynamicSamplingContextFromClient_59689Binding.sampled = String(value.spanIsSampled(rootSpan));
|
|
}
|
|
client.emit('createDsc', dynamicSamplingContextFromClient_59689Binding, rootSpan);
|
|
return dynamicSamplingContextFromClient_59689Binding;
|
|
}
|
|
return {};
|
|
}
|
|
|
|
function spanToBaggageHeader_59693(a0) { // fn#59693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7583:1458, offset: 0x016ef9c8, size: 50 bytes, params: 2, frame: 13
|
|
return (require(7382) /* metro dependency 7382 */).dynamicSamplingContextToSentryBaggageHeader(getDynamicSamplingContextFromSpan_59690(a0));
|
|
}
|
|
|