Skip to content

Commit 1b87a8f

Browse files
committed
ref: move tracing channel helper to subpath export because nextjs is a framework held together by ductape
1 parent 56e7a99 commit 1b87a8f

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

packages/opentelemetry/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
"types": "./build/types/index.d.ts",
2727
"default": "./build/cjs/index.js"
2828
}
29+
},
30+
"./tracingChannel": {
31+
"import": {
32+
"types": "./build/types/tracingChannel.d.ts",
33+
"default": "./build/esm/tracingChannel.js"
34+
},
35+
"require": {
36+
"types": "./build/types/tracingChannel.d.ts",
37+
"default": "./build/cjs/tracingChannel.js"
38+
}
2939
}
3040
},
3141
"typesVersions": {

packages/opentelemetry/rollup.npm.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollu
22

33
export default makeNPMConfigVariants(
44
makeBaseNPMConfig({
5+
// `tracingChannel` is a Node.js-only subpath so `node:diagnostics_channel`
6+
// isn't pulled into the main bundle (breaks edge/browser builds).
7+
entrypoints: ['src/index.ts', 'src/tracingChannel.ts'],
58
packageSpecificConfig: {
69
output: {
710
// set exports to 'named' or 'auto' so that rollup doesn't warn

packages/opentelemetry/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ export { openTelemetrySetupCheck } from './utils/setupCheck';
5151

5252
export { getSentryResource } from './resource';
5353

54-
export { tracingChannel } from './tracingChannel';
55-
export type { OtelTracingChannel, OtelTracingChannelTransform } from './tracingChannel';
56-
5754
export { withStreamedSpan } from '@sentry/core';
5855

5956
// Legacy

0 commit comments

Comments
 (0)