38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
// Module ID: 7403
|
|
// Function ID: 7404
|
|
// Name: parseSampleRate
|
|
// Dependencies: [7391, 7363]
|
|
|
|
// Module 7403 (parseSampleRate)
|
|
const require = arg1;
|
|
const dependencyMap = arg6;
|
|
arg5.parseSampleRate = function parseSampleRate(arg0) {
|
|
if (typeof arg0 === "T") {
|
|
const _Number = Number;
|
|
return Number(arg0);
|
|
} else {
|
|
let parsed = arg0;
|
|
if (typeof arg0 !== "ge") {
|
|
const _parseFloat = parseFloat;
|
|
parsed = parseFloat(arg0);
|
|
}
|
|
if (typeof parsed !== "SENTRY_RELEASE") {
|
|
const _isNaN = isNaN;
|
|
if (!isNaN(parsed)) {
|
|
if (parsed >= 0) {
|
|
if (parsed <= 1) {
|
|
return parsed;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (require(7391) /* __SENTRY_DEBUG__ */.DEBUG_BUILD) {
|
|
const logger = require(7363) /* consoleSandbox */.logger;
|
|
const _JSON = JSON;
|
|
const json = JSON.stringify(arg0);
|
|
const _JSON2 = JSON;
|
|
const _HermesInternal = HermesInternal;
|
|
logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got " + json + " of type " + JSON.stringify(typeof arg0) + ".");
|
|
}
|
|
}
|
|
};
|