File tree 1 file changed +2
-2
lines changed
packages/opentelemetry/src
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ export class SentrySampler implements Sampler {
67
67
// If we encounter a span emitted by Next.js, we do not want to sample it
68
68
// The reason for this is that the data quality of the spans varies, it is different per version of Next,
69
69
// and we need to keep our manual instrumentation around for the edge runtime anyhow.
70
- // BUT we only do this if we don't have a parent span with a sampling decision yet
71
- if ( spanAttributes [ 'next.span_type' ] && typeof parentSampled !== 'boolean' ) {
70
+ // BUT we only do this if we don't have a parent span with a sampling decision yet (or if the parent is remote)
71
+ if ( spanAttributes [ 'next.span_type' ] && ( typeof parentSampled !== 'boolean' || parentContext ?. isRemote ) ) {
72
72
return { decision : SamplingDecision . NOT_RECORD , traceState : traceState } ;
73
73
}
74
74
You can’t perform that action at this time.
0 commit comments