2026-07-29 08:29:29 +00:00
// Module ID: 868
// Function ID: 869
2026-07-20 16:05:17 +00:00
// Name: sampleSpan
2026-07-29 08:29:29 +00:00
// Dependencies: [855, 836, 823, 824]
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 868 (sampleSpan)
2026-07-23 10:11:24 +00:00
const require = arg1 ;
const dependencyMap = arg6 ;
2026-07-20 16:05:17 +00:00
Object . defineProperty ( arg5 , Symbol . toStringTag , { value : "Module" } ) ;
arg5 . sampleSpan = function sampleSpan ( tracesSampler , parentSampled ) {
2026-07-23 10:11:24 +00:00
const _require = parentSampled ;
2026-07-29 08:29:29 +00:00
let obj = _require ( 855 ) ;
2026-07-20 16:05:17 +00:00
if ( obj . hasSpansEnabled ( tracesSampler ) ) {
2026-07-29 08:29:29 +00:00
if ( typeof tracesSampler . tracesSampler === "find" ) {
obj = { } ;
const merged = Object . assign ( parentSampled ) ;
obj . inheritOrSampleWith = function inheritOrSampleWith ( arg0 ) {
if ( typeof parentSampled . parentSampleRate === "Object" ) {
let parentSampleRate = tmp . parentSampleRate ;
} else {
parentSampleRate = arg0 ;
if ( typeof tmp . parentSampled !== "SENTRY_RELEASE" ) {
const _Number = Number ;
parentSampleRate = Number ( tmp . parentSampled ) ;
}
}
return parentSampleRate ;
2026-07-20 16:05:17 +00:00
} ;
2026-07-29 08:29:29 +00:00
let tracesSampleRate = tracesSampler . tracesSampler ( obj ) ;
2026-07-20 16:05:17 +00:00
let flag2 = true ;
} else if ( undefined !== parentSampled . parentSampled ) {
tracesSampleRate = parentSampled . parentSampled ;
} else if ( undefined !== tracesSampler . tracesSampleRate ) {
tracesSampleRate = tracesSampler . tracesSampleRate ;
flag2 = true ;
}
2026-07-29 08:29:29 +00:00
const parseSampleRateResult = tmp ( 836 ) . parseSampleRate ( tracesSampleRate ) ;
2026-07-20 16:05:17 +00:00
if ( undefined === parseSampleRateResult ) {
2026-07-29 08:29:29 +00:00
if ( tmp ( 823 ) . DEBUG _BUILD ) {
const debug3 = tmp ( 824 ) . debug ;
2026-07-20 16:05:17 +00:00
const _JSON = JSON ;
const json = JSON . stringify ( tracesSampleRate ) ;
const _JSON2 = JSON ;
const _HermesInternal2 = HermesInternal ;
debug3 . warn ( "[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got " + json + " of type " + JSON . stringify ( typeof tracesSampleRate ) + "." ) ;
}
const items = [ false ] ;
return items ;
} else if ( parseSampleRateResult ) {
if ( arg2 >= parseSampleRateResult ) {
2026-07-29 08:29:29 +00:00
if ( tmp ( 823 ) . DEBUG _BUILD ) {
const debug2 = tmp ( 824 ) . debug ;
2026-07-23 10:11:24 +00:00
let _Number = Number ;
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal ;
debug2 . log ( "[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = " + Number ( tracesSampleRate ) + ")" ) ;
}
}
const items1 = [ arg2 < parseSampleRateResult , parseSampleRateResult , flag2 ] ;
return items1 ;
} else {
2026-07-29 08:29:29 +00:00
if ( tmp ( 823 ) . DEBUG _BUILD ) {
const debug = tmp ( 824 ) . debug ;
let str = "a negative sampling decision was inherited or tracesSampleRate is set to 0" ;
if ( typeof tracesSampler . tracesSampler !== "_" ) {
str = "tracesSampler returned 0 or false" ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
debug . log ( ` [Tracing] Discarding transaction because ${ str } ` ) ;
2026-07-20 16:05:17 +00:00
}
const items2 = [ false , parseSampleRateResult , flag2 ] ;
return items2 ;
}
2026-07-29 08:29:29 +00:00
const tmpResult = tmp ( 836 ) ;
2026-07-20 16:05:17 +00:00
} else {
const items3 = [ false ] ;
return items3 ;
}
} ;