Skip to content

Commit

Permalink
formatting, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed Aug 14, 2024
1 parent 0a99c5c commit 2ee13dd
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions packages/opentelemetry/src/propagator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { propagation, trace } from '@opentelemetry/api';
import { W3CBaggagePropagator, isTracingSuppressed } from '@opentelemetry/core';
import { SEMATTRS_HTTP_URL } from '@opentelemetry/semantic-conventions';
import type { continueTrace } from '@sentry/core';
import { hasTracingEnabled } from '@sentry/core';
import { getRootSpan } from '@sentry/core';
import { spanToJSON } from '@sentry/core';
import {
Expand Down Expand Up @@ -93,8 +92,6 @@ export class SentryPropagator extends W3CBaggagePropagator {
const activeSpan = trace.getSpan(context);
const url = activeSpan && getCurrentURL(activeSpan);

console.log('1', { activeSpan, url });

const tracePropagationTargets = getClient()?.getOptions()?.tracePropagationTargets;
if (
typeof url === 'string' &&
Expand All @@ -106,7 +103,6 @@ export class SentryPropagator extends W3CBaggagePropagator {
'[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:',
url,
);
console.log('2', { tracePropagationTargets });
return;
}

Expand All @@ -115,7 +111,6 @@ export class SentryPropagator extends W3CBaggagePropagator {

const { dynamicSamplingContext, traceId, spanId, sampled } = getInjectionData(context);

console.log('3', { existingBaggageHeader, baggage, dynamicSamplingContext, traceId, spanId, sampled });
if (existingBaggageHeader) {
const baggageEntries = parseBaggageHeader(existingBaggageHeader);

Expand All @@ -124,7 +119,6 @@ export class SentryPropagator extends W3CBaggagePropagator {
baggage = baggage.setEntry(key, { value });
});
}
console.log('4', { baggageEntries, baggage });
}

if (dynamicSamplingContext) {
Expand All @@ -134,17 +128,14 @@ export class SentryPropagator extends W3CBaggagePropagator {
}
return b;
}, baggage);
console.log('5', { dynamicSamplingContext, baggage });
}

// We also want to avoid setting the default OTEL trace ID, if we get that for whatever reason
if (traceId && traceId !== INVALID_TRACEID) {
setter.set(carrier, SENTRY_TRACE_HEADER, generateSentryTraceHeader(traceId, spanId, sampled));
console.log('6', { carrier, traceId, spanId, sampled });
}

super.inject(propagation.setBaggage(context, baggage), carrier, setter);
console.log('7', { carrier });
}

/**
Expand Down

0 comments on commit 2ee13dd

Please sign in to comment.