File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed
packages/opentelemetry/src Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,11 @@ export class SentrySampler implements Sampler {
7272 // We only sample based on parameters (like tracesSampleRate or tracesSampler) for root spans (which is done in sampleSpan).
7373 // Non-root-spans simply inherit the sampling decision from their parent.
7474 if ( ! isRootSpan ) {
75- return {
76- ...wrapSamplingDecision ( {
77- decision : parentSampled ? SamplingDecision . RECORD_AND_SAMPLED : SamplingDecision . NOT_RECORD ,
78- context,
79- spanAttributes,
80- } ) ,
81- } ;
75+ return wrapSamplingDecision ( {
76+ decision : parentSampled ? SamplingDecision . RECORD_AND_SAMPLED : SamplingDecision . NOT_RECORD ,
77+ context,
78+ spanAttributes,
79+ } ) ;
8280 }
8381
8482 // We want to pass the inferred name & attributes to the sampler method
@@ -135,15 +133,13 @@ export class SentrySampler implements Sampler {
135133 if ( method === 'OPTIONS' || method === 'HEAD' ) {
136134 DEBUG_BUILD && logger . log ( `[Tracing] Not sampling span because HTTP method is '${ method } ' for ${ spanName } ` ) ;
137135
138- return {
139- ...wrapSamplingDecision ( {
140- decision : SamplingDecision . NOT_RECORD ,
141- context,
142- spanAttributes,
143- sampleRand,
144- downstreamTraceSampleRate : 0 , // we don't want to sample anything in the downstream trace either
145- } ) ,
146- } ;
136+ return wrapSamplingDecision ( {
137+ decision : SamplingDecision . NOT_RECORD ,
138+ context,
139+ spanAttributes,
140+ sampleRand,
141+ downstreamTraceSampleRate : 0 , // we don't want to sample anything in the downstream trace either
142+ } ) ;
147143 }
148144
149145 if (
You can’t perform that action at this time.
0 commit comments