115 lines
5.8 KiB
React
115 lines
5.8 KiB
React
/* Metro module 865; source: unknown; dependencies: [831, 866, 846, 857, 828, 848, 844, 863, 829] */
|
|
function _fun9311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:992:6, offset: 0x00d62c55, size: 140 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const closure = getDynamicSamplingContextFromClient;
|
|
const closure2 = getDynamicSamplingContextFromSpan;
|
|
const Object = global.Object;
|
|
const defineProperty = Object.defineProperty;
|
|
const Symbol = global.Symbol;
|
|
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
|
|
exports.freezeDscOnSpan = freezeDscOnSpan;
|
|
exports.getDynamicSamplingContextFromClient = closure;
|
|
exports.getDynamicSamplingContextFromScope = getDynamicSamplingContextFromScope;
|
|
exports.getDynamicSamplingContextFromSpan = closure2;
|
|
exports.spanToBaggageHeader = spanToBaggageHeader;
|
|
}
|
|
|
|
function getDynamicSamplingContextFromClient(a0, a1) { // fn#9312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:992:110, offset: 0x00d62ce1, size: 166 bytes, params: 3, frame: 17
|
|
const options = a1.getOptions();
|
|
const publicKey = (a1.getDsn() || ({})).publicKey;
|
|
const object2 = {};
|
|
object2.environment = options.environment || (require(866) /* metro dependency 866 */).DEFAULT_ENVIRONMENT;
|
|
object2.release = options.release;
|
|
object2.public_key = publicKey;
|
|
object2.trace_id = a0;
|
|
object2.org_id = (require(846) /* metro dependency 846 */).extractOrgIdFromClient(a1);
|
|
a1.emit('createDsc', object2);
|
|
return object2;
|
|
}
|
|
|
|
function getDynamicSamplingContextFromSpan(a0) { // fn#9313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:992:383, offset: 0x00d62d87, size: 621 bytes, params: 2, frame: 27
|
|
var r0;
|
|
var r15;
|
|
var r3;
|
|
var r5;
|
|
var rootSpan;
|
|
var value5;
|
|
var data;
|
|
var spanContext;
|
|
var traceState;
|
|
var property;
|
|
var getDynamicSamplingContextFromClientBinding;
|
|
var dynamicSamplingContextFromClientBinding;
|
|
var description;
|
|
var moduleValue5;
|
|
var String;
|
|
var moduleValue6;
|
|
var scope;
|
|
const closure = applyLocalSampleRateToDsc;
|
|
var value;
|
|
const value2 = undefined;
|
|
const client = (require(857) /* metro dependency 857 */).getClient();
|
|
if (client) {
|
|
rootSpan = (require(828) /* metro dependency 828 */).getRootSpan(a0);
|
|
value5 = (require(828) /* metro dependency 828 */).spanToJSON(rootSpan);
|
|
data = value5.data;
|
|
spanContext = rootSpan.spanContext;
|
|
traceState = Reflect.apply(spanContext, rootSpan, []).traceState;
|
|
r0 = traceState == null ? value2 : traceState.get('sentry.sample_rate');
|
|
r0 = r0 ?? data[(require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];
|
|
if (r0 == null) {
|
|
property = data[(require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE];
|
|
}
|
|
property = rootSpan[env0_2];
|
|
if (property) {
|
|
closure(property);
|
|
return property;
|
|
}
|
|
r15 = traceState == null ? value2 : traceState.get('sentry.dsc');
|
|
r3 = r15 && (require(844) /* metro dependency 844 */).baggageHeaderToDynamicSamplingContext(r15);
|
|
if (r3) {
|
|
closure(r3);
|
|
return r3;
|
|
}
|
|
getDynamicSamplingContextFromClientBinding = getDynamicSamplingContextFromClient;
|
|
spanContext = a0.spanContext;
|
|
dynamicSamplingContextFromClientBinding = getDynamicSamplingContextFromClientBinding(Reflect.apply(spanContext,
|
|
a0,
|
|
[]).traceId, client);
|
|
property = data[(require(848) /* metro dependency 848 */).SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];
|
|
description = value5.description;
|
|
if (property !== 'url' && description) {
|
|
dynamicSamplingContextFromClientBinding.transaction = description;
|
|
}
|
|
moduleValue5 = require(863) /* metro dependency 863 */;
|
|
if (moduleValue5.hasSpansEnabled()) {
|
|
String = global.String;
|
|
moduleValue6 = require(828) /* metro dependency 828 */;
|
|
dynamicSamplingContextFromClientBinding.sampled = String(moduleValue6.spanIsSampled(rootSpan));
|
|
r5 = traceState == null ? value2 : traceState.get('sentry.sample_rand');
|
|
if (r5 == null) {
|
|
value = require(829) /* metro dependency 829 */;
|
|
scope = value.getCapturedScopesOnSpan(rootSpan).scope;
|
|
r5 = scope == null ? value2 : scope.getPropagationContext().sampleRand.toString();
|
|
}
|
|
dynamicSamplingContextFromClientBinding.sample_rand = r5;
|
|
}
|
|
closure(dynamicSamplingContextFromClientBinding);
|
|
client.emit('createDsc', dynamicSamplingContextFromClientBinding, rootSpan);
|
|
return dynamicSamplingContextFromClientBinding;
|
|
}
|
|
return {};
|
|
}
|
|
|
|
function spanToBaggageHeader(a0) { // fn#9317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:992:1967, offset: 0x00d630a1, size: 50 bytes, params: 2, frame: 13
|
|
return (require(844) /* metro dependency 844 */).dynamicSamplingContextToSentryBaggageHeader(getDynamicSamplingContextFromSpan(a0));
|
|
}
|
|
|
|
function applyLocalSampleRateToDsc(a0) { // fn#9314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:992:747, owner: getDynamicSamplingContextFromSpan.applyLocalSampleRateToDsc, offset: 0x00d62ff4, size: 76 bytes, params: 2, frame: 13
|
|
if (!(typeof env0_0 !== 'number' && typeof env0_0 !== 'string')) {
|
|
a0.sample_rate = '' + env0_0;
|
|
}
|
|
return a0;
|
|
}
|
|
|