Skip to content

Commit 86b89b9

Browse files
authored
feat(tracing): Migrate some imports away from @sentry/tracing (#7539)
1 parent 95b0a6c commit 86b89b9

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

packages/nextjs/src/server/wrapApiHandlerWithSentry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { hasTracingEnabled } from '@sentry/core';
22
import { captureException, getCurrentHub, startTransaction } from '@sentry/node';
3-
import { extractTraceparentData } from '@sentry/tracing';
43
import type { Transaction } from '@sentry/types';
54
import {
65
addExceptionMechanism,
76
baggageHeaderToDynamicSamplingContext,
7+
extractTraceparentData,
88
isString,
99
logger,
1010
objectify,

packages/opentelemetry-node/src/spanprocessor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import type { Context } from '@opentelemetry/api';
22
import { SpanKind, trace } from '@opentelemetry/api';
33
import type { Span as OtelSpan, SpanProcessor as OtelSpanProcessor } from '@opentelemetry/sdk-trace-base';
44
import { SemanticAttributes } from '@opentelemetry/semantic-conventions';
5-
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
6-
import { Transaction } from '@sentry/tracing';
5+
import { addGlobalEventProcessor, getCurrentHub, Transaction } from '@sentry/core';
76
import type { DynamicSamplingContext, Span as SentrySpan, TraceparentData, TransactionContext } from '@sentry/types';
87
import { isString, logger } from '@sentry/utils';
98

packages/opentelemetry-node/src/utils/map-otel-status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Span as OtelSpan } from '@opentelemetry/sdk-trace-base';
22
import { SemanticAttributes } from '@opentelemetry/semantic-conventions';
3-
import type { SpanStatusType as SentryStatus } from '@sentry/tracing';
3+
import type { SpanStatusType as SentryStatus } from '@sentry/core';
44

55
// canonicalCodesHTTPMap maps some HTTP codes to Sentry's span statuses. See possible mapping in https://develop.sentry.dev/sdk/event-payloads/span/
66
const canonicalCodesHTTPMap: Record<string, SentryStatus> = {

packages/remix/src/utils/instrumentServer.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/* eslint-disable max-lines */
2-
import { hasTracingEnabled } from '@sentry/core';
2+
import { getActiveTransaction, hasTracingEnabled } from '@sentry/core';
33
import type { Hub } from '@sentry/node';
44
import { captureException, getCurrentHub } from '@sentry/node';
5-
import { getActiveTransaction } from '@sentry/tracing';
65
import type { Transaction, TransactionSource, WrappedFunction } from '@sentry/types';
76
import {
87
addExceptionMechanism,

packages/serverless/src/awslambda.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
import type { Scope } from '@sentry/node';
33
import * as Sentry from '@sentry/node';
44
import { captureException, captureMessage, flush, getCurrentHub, withScope } from '@sentry/node';
5-
import { extractTraceparentData } from '@sentry/tracing';
65
import type { Integration } from '@sentry/types';
7-
import { baggageHeaderToDynamicSamplingContext, dsnFromString, dsnToString, isString, logger } from '@sentry/utils';
6+
import {
7+
baggageHeaderToDynamicSamplingContext,
8+
dsnFromString,
9+
dsnToString,
10+
extractTraceparentData,
11+
isString,
12+
logger,
13+
} from '@sentry/utils';
814
// NOTE: I have no idea how to fix this right now, and don't want to waste more time, as it builds just fine — Kamil
915
// eslint-disable-next-line import/no-unresolved
1016
import type { Context, Handler } from 'aws-lambda';

packages/serverless/src/gcpfunction/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { AddRequestDataToEventOptions } from '@sentry/node';
22
import { captureException, flush, getCurrentHub } from '@sentry/node';
3-
import { extractTraceparentData } from '@sentry/tracing';
43
import {
54
baggageHeaderToDynamicSamplingContext,
5+
extractTraceparentData,
66
isString,
77
isThenable,
88
logger,

0 commit comments

Comments
 (0)