Skip to content

Commit c5f8e48

Browse files
authored
fix(tracing): Export key tracing types from node and browser SDKs (#7593)
1 parent c4fbb1f commit c5f8e48

File tree

6 files changed

+19
-5
lines changed

6 files changed

+19
-5
lines changed

packages/browser/src/exports.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ export type {
99
// eslint-disable-next-line deprecation/deprecation
1010
Severity,
1111
SeverityLevel,
12+
Span,
1213
StackFrame,
1314
Stacktrace,
1415
Thread,
16+
Transaction,
1517
User,
1618
Session,
1719
} from '@sentry/types';

packages/browser/src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ export { INTEGRATIONS as Integrations };
2222

2323
export { Replay } from '@sentry/replay';
2424
export { BrowserTracing, defaultRequestInstrumentationOptions } from '@sentry-internal/tracing';
25-
export { addTracingExtensions, getActiveTransaction } from '@sentry/core';
25+
export {
26+
addTracingExtensions,
27+
extractTraceparentData,
28+
getActiveTransaction,
29+
spanStatusfromHttpCode,
30+
trace,
31+
} from '@sentry/core';
32+
export type { SpanStatusType } from '@sentry/core';
2633
export { makeBrowserOfflineTransport } from './transports/offline';
2734
export { onProfilingStartRouteTransaction } from './profiling/hubextensions';
2835
export { BrowserProfilingIntegration } from './profiling/integration';

packages/core/src/tracing/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export { startIdleTransaction, addTracingExtensions } from './hubextensions';
22
export { IdleTransaction, TRACING_DEFAULTS } from './idletransaction';
33
export { Span, spanStatusfromHttpCode } from './span';
44
export { Transaction } from './transaction';
5-
export { extractTraceparentData, getActiveTransaction, stripUrlQueryAndFragment, TRACEPARENT_REGEXP } from './utils';
5+
export { extractTraceparentData, getActiveTransaction } from './utils';
66
// eslint-disable-next-line deprecation/deprecation
77
export { SpanStatus } from './spanstatus';
88
export type { SpanStatusType } from './span';

packages/nextjs/src/index.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export declare const showReportDialog: typeof clientSdk.showReportDialog;
3737
export declare const withErrorBoundary: typeof clientSdk.withErrorBoundary;
3838

3939
export declare const Span: typeof edgeSdk.Span;
40+
export declare const Transaction: typeof edgeSdk.Transaction;
4041

4142
/**
4243
* @deprecated Use `wrapApiHandlerWithSentry` instead

packages/node/src/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ export type {
1111
// eslint-disable-next-line deprecation/deprecation
1212
Severity,
1313
SeverityLevel,
14+
Span,
1415
StackFrame,
1516
Stacktrace,
1617
Thread,
18+
Transaction,
1719
User,
18-
Span,
1920
} from '@sentry/types';
2021
export type { AddRequestDataToEventOptions } from '@sentry/utils';
2122

@@ -30,6 +31,7 @@ export {
3031
captureMessage,
3132
configureScope,
3233
createTransport,
34+
extractTraceparentData,
3335
getActiveTransaction,
3436
getHubFromCarrier,
3537
getCurrentHub,
@@ -44,8 +46,11 @@ export {
4446
setTag,
4547
setTags,
4648
setUser,
49+
spanStatusfromHttpCode,
50+
trace,
4751
withScope,
4852
} from '@sentry/core';
53+
export type { SpanStatusType } from '@sentry/core';
4954
export { autoDiscoverNodePerformanceMonitoringIntegrations } from './tracing';
5055

5156
export { NodeClient } from './client';

packages/tracing-internal/src/exports/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ export {
88
SpanStatus,
99
spanStatusfromHttpCode,
1010
startIdleTransaction,
11-
stripUrlQueryAndFragment,
12-
TRACEPARENT_REGEXP,
1311
Transaction,
1412
} from '@sentry/core';
1513
export type { SpanStatusType } from '@sentry/core';
14+
export { stripUrlQueryAndFragment, TRACEPARENT_REGEXP } from '@sentry/utils';

0 commit comments

Comments
 (0)