@sentry/opentelemetry 10.0.0-alpha.1 → 10.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -853,9 +853,12 @@ function getContextWithRemoteActiveSpan(
853
853
 
854
854
  const { traceId, parentSpanId, sampled, dsc } = propagationContext;
855
855
 
856
+ const client = core.getClient();
857
+ const incomingDsc = core.baggageHeaderToDynamicSamplingContext(baggage);
858
+
856
859
  // We only want to set the virtual span if we are continuing a concrete trace
857
860
  // Otherwise, we ignore the incoming trace here, e.g. if we have no trace headers
858
- if (!parentSpanId) {
861
+ if (!parentSpanId || (client && !core.shouldContinueTrace(client, incomingDsc?.org_id))) {
859
862
  return ctx;
860
863
  }
861
864
 
@@ -1189,7 +1192,7 @@ function continueTrace(options, callback) {
1189
1192
 
1190
1193
  /**
1191
1194
  * Get the trace context for a given scope.
1192
- * We have a custom implemention here because we need an OTEL-specific way to get the span from a scope.
1195
+ * We have a custom implementation here because we need an OTEL-specific way to get the span from a scope.
1193
1196
  */
1194
1197
  function getTraceContextForScope(
1195
1198
  client,