Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/opentelemetry/src/sampler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export class SentrySampler implements Sampler {
// If we encounter a span emitted by Next.js, we do not want to sample it
// The reason for this is that the data quality of the spans varies, it is different per version of Next,
// and we need to keep our manual instrumentation around for the edge runtime anyhow.
// BUT we only do this if we don't have a parent span with a sampling decision yet
if (spanAttributes['next.span_type'] && typeof parentSampled !== 'boolean') {
// BUT we only do this if we don't have a parent span with a sampling decision yet (or if the parent is remote)
if (spanAttributes['next.span_type'] && (typeof parentSampled !== 'boolean' || parentContext?.isRemote)) {
return { decision: SamplingDecision.NOT_RECORD, traceState: traceState };
}

Expand Down