diff --git a/packages/core/src/tracing/sentrySpan.ts b/packages/core/src/tracing/sentrySpan.ts index ce816420719b..126702dfad2b 100644 --- a/packages/core/src/tracing/sentrySpan.ts +++ b/packages/core/src/tracing/sentrySpan.ts @@ -12,8 +12,8 @@ import { import type { SentrySpanArguments, Span, - SpanAttributes, SpanAttributeValue, + SpanAttributes, SpanContextData, SpanEnvelope, SpanJSON, @@ -29,14 +29,14 @@ import { dropUndefinedKeys } from '../utils-hoist/object'; import { generateSpanId, generateTraceId } from '../utils-hoist/propagationContext'; import { timestampInSeconds } from '../utils-hoist/time'; import { + TRACE_FLAG_NONE, + TRACE_FLAG_SAMPLED, getRootSpan, getSpanDescendants, getStatusMessage, spanTimeInputToSeconds, spanToJSON, spanToTransactionTraceContext, - TRACE_FLAG_NONE, - TRACE_FLAG_SAMPLED, } from '../utils/spanUtils'; import { getDynamicSamplingContextFromSpan } from './dynamicSamplingContext'; import { logSpanEnd } from './logSpans'; diff --git a/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts b/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts index 85b222f793e5..4b764aeeed8e 100644 --- a/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts +++ b/packages/nextjs/src/common/wrapGenerationFunctionWithSentry.ts @@ -1,5 +1,10 @@ import type { RequestEventData, WebFetchHeaders } from '@sentry/core'; import { + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + SPAN_STATUS_ERROR, + SPAN_STATUS_OK, + Scope, captureException, generateSpanId, generateTraceId, @@ -9,12 +14,7 @@ import { getRootSpan, handleCallbackErrors, propagationContextFromHeaders, - Scope, - SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, - SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, setCapturedScopesOnSpan, - SPAN_STATUS_ERROR, - SPAN_STATUS_OK, startSpanManual, winterCGHeadersToDict, withIsolationScope, diff --git a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts index c7d534038de8..0d4ffe5f32d1 100644 --- a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts +++ b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts @@ -1,5 +1,10 @@ import type { RequestEventData } from '@sentry/core'; import { + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + SPAN_STATUS_ERROR, + SPAN_STATUS_OK, + Scope, captureException, generateSpanId, generateTraceId, @@ -8,12 +13,7 @@ import { getRootSpan, handleCallbackErrors, propagationContextFromHeaders, - Scope, - SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, - SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, setCapturedScopesOnSpan, - SPAN_STATUS_ERROR, - SPAN_STATUS_OK, startSpanManual, vercelWaitUntil, winterCGHeadersToDict, diff --git a/packages/opentelemetry/src/propagator.ts b/packages/opentelemetry/src/propagator.ts index 3af1173c5919..09ba10a173a4 100644 --- a/packages/opentelemetry/src/propagator.ts +++ b/packages/opentelemetry/src/propagator.ts @@ -1,9 +1,11 @@ import type { Baggage, Context, Span, SpanContext, TextMapGetter, TextMapSetter } from '@opentelemetry/api'; -import { context, INVALID_TRACEID, propagation, trace, TraceFlags } from '@opentelemetry/api'; -import { isTracingSuppressed, W3CBaggagePropagator } from '@opentelemetry/core'; +import { INVALID_TRACEID, TraceFlags, context, propagation, trace } from '@opentelemetry/api'; +import { W3CBaggagePropagator, isTracingSuppressed } from '@opentelemetry/core'; import { ATTR_URL_FULL, SEMATTRS_HTTP_URL } from '@opentelemetry/semantic-conventions'; -import type { continueTrace, DynamicSamplingContext, Options, PropagationContext } from '@sentry/core'; +import type { DynamicSamplingContext, Options, PropagationContext, continueTrace } from '@sentry/core'; import { + LRUMap, + SENTRY_BAGGAGE_KEY_PREFIX, baggageHeaderToDynamicSamplingContext, generateSentryTraceHeader, generateSpanId, @@ -14,10 +16,8 @@ import { getIsolationScope, getRootSpan, logger, - LRUMap, parseBaggageHeader, propagationContextFromHeaders, - SENTRY_BAGGAGE_KEY_PREFIX, spanToJSON, stringMatchesSomePattern, } from '@sentry/core'; diff --git a/packages/opentelemetry/src/spanExporter.ts b/packages/opentelemetry/src/spanExporter.ts index 1f74c69aae8a..ad044372e0df 100644 --- a/packages/opentelemetry/src/spanExporter.ts +++ b/packages/opentelemetry/src/spanExporter.ts @@ -4,6 +4,10 @@ import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import { ATTR_HTTP_RESPONSE_STATUS_CODE, SEMATTRS_HTTP_STATUS_CODE } from '@opentelemetry/semantic-conventions'; import type { SpanJSON, SpanOrigin, TraceContext, TransactionEvent, TransactionSource } from '@sentry/core'; import { + SEMANTIC_ATTRIBUTE_SENTRY_OP, + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, + SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, captureEvent, dropUndefinedKeys, getCapturedScopesOnSpan, @@ -11,10 +15,6 @@ import { getMetricSummaryJsonForSpan, getStatusMessage, logger, - SEMANTIC_ATTRIBUTE_SENTRY_OP, - SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, - SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, - SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, spanTimeInputToSeconds, timedEventsToMeasurements, } from '@sentry/core';