@sentry/opentelemetry 9.39.0 → 9.40.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.
@@ -689,7 +689,7 @@ class SentryPropagator extends core$1.W3CBaggagePropagator {
689
689
  */
690
690
  inject(context, carrier, setter) {
691
691
  if (core$1.isTracingSuppressed(context)) {
692
- DEBUG_BUILD && core.logger.log('[Tracing] Not injecting trace data for url because tracing is suppressed.');
692
+ DEBUG_BUILD && core.debug.log('[Tracing] Not injecting trace data for url because tracing is suppressed.');
693
693
  return;
694
694
  }
695
695
 
@@ -699,10 +699,7 @@ class SentryPropagator extends core$1.W3CBaggagePropagator {
699
699
  const tracePropagationTargets = core.getClient()?.getOptions()?.tracePropagationTargets;
700
700
  if (!shouldPropagateTraceForUrl(url, tracePropagationTargets, this._urlMatchesTargetsMap)) {
701
701
  DEBUG_BUILD &&
702
- core.logger.log(
703
- '[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:',
704
- url,
705
- );
702
+ core.debug.log('[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:', url);
706
703
  return;
707
704
  }
708
705
 
@@ -783,14 +780,14 @@ function shouldPropagateTraceForUrl(
783
780
 
784
781
  const cachedDecision = decisionMap?.get(url);
785
782
  if (cachedDecision !== undefined) {
786
- DEBUG_BUILD && !cachedDecision && core.logger.log(NOT_PROPAGATED_MESSAGE, url);
783
+ DEBUG_BUILD && !cachedDecision && core.debug.log(NOT_PROPAGATED_MESSAGE, url);
787
784
  return cachedDecision;
788
785
  }
789
786
 
790
787
  const decision = core.stringMatchesSomePattern(url, tracePropagationTargets);
791
788
  decisionMap?.set(url, decision);
792
789
 
793
- DEBUG_BUILD && !decision && core.logger.log(NOT_PROPAGATED_MESSAGE, url);
790
+ DEBUG_BUILD && !decision && core.debug.log(NOT_PROPAGATED_MESSAGE, url);
794
791
  return decision;
795
792
  }
796
793
 
@@ -1659,7 +1656,7 @@ class SentrySpanExporter {
1659
1656
  });
1660
1657
  if (droppedSpanCount > 0) {
1661
1658
  DEBUG_BUILD &&
1662
- core.logger.log(
1659
+ core.debug.log(
1663
1660
  `SpanExporter dropped ${droppedSpanCount} spans because they were pending for more than ${this._finishedSpanBucketSize} seconds.`,
1664
1661
  );
1665
1662
  }
@@ -1696,7 +1693,7 @@ class SentrySpanExporter {
1696
1693
  const sentSpanCount = sentSpans.size;
1697
1694
  const remainingOpenSpanCount = finishedSpans.length - sentSpanCount;
1698
1695
  DEBUG_BUILD &&
1699
- core.logger.log(
1696
+ core.debug.log(
1700
1697
  `SpanExporter exported ${sentSpanCount} spans, ${remainingOpenSpanCount} spans are waiting for their parent spans to finish`,
1701
1698
  );
1702
1699
 
@@ -2191,7 +2188,7 @@ class SentrySampler {
2191
2188
 
2192
2189
  const method = `${maybeSpanHttpMethod}`.toUpperCase();
2193
2190
  if (method === 'OPTIONS' || method === 'HEAD') {
2194
- DEBUG_BUILD && core.logger.log(`[Tracing] Not sampling span because HTTP method is '${method}' for ${spanName}`);
2191
+ DEBUG_BUILD && core.debug.log(`[Tracing] Not sampling span because HTTP method is '${method}' for ${spanName}`);
2195
2192
 
2196
2193
  return wrapSamplingDecision({
2197
2194
  decision: sdkTraceBase.SamplingDecision.NOT_RECORD,
@@ -2207,7 +2204,7 @@ class SentrySampler {
2207
2204
  // We check for `parentSampled === undefined` because we only want to record client reports for spans that are trace roots (ie. when there was incoming trace)
2208
2205
  parentSampled === undefined
2209
2206
  ) {
2210
- DEBUG_BUILD && core.logger.log('[Tracing] Discarding root span because its trace was not chosen to be sampled.');
2207
+ DEBUG_BUILD && core.debug.log('[Tracing] Discarding root span because its trace was not chosen to be sampled.');
2211
2208
  this._client.recordDroppedEvent('sample_rate', 'transaction');
2212
2209
  }
2213
2210
 
@@ -2241,12 +2238,12 @@ function getParentSampled(parentSpan, traceId, spanName) {
2241
2238
  if (parentContext.isRemote) {
2242
2239
  const parentSampled = getSamplingDecision(parentSpan.spanContext());
2243
2240
  DEBUG_BUILD &&
2244
- core.logger.log(`[Tracing] Inheriting remote parent's sampled decision for ${spanName}: ${parentSampled}`);
2241
+ core.debug.log(`[Tracing] Inheriting remote parent's sampled decision for ${spanName}: ${parentSampled}`);
2245
2242
  return parentSampled;
2246
2243
  }
2247
2244
 
2248
2245
  const parentSampled = getSamplingDecision(parentContext);
2249
- DEBUG_BUILD && core.logger.log(`[Tracing] Inheriting parent's sampled decision for ${spanName}: ${parentSampled}`);
2246
+ DEBUG_BUILD && core.debug.log(`[Tracing] Inheriting parent's sampled decision for ${spanName}: ${parentSampled}`);
2250
2247
  return parentSampled;
2251
2248
  }
2252
2249