Skip to content

Commit dfa863a

Browse files
authored
ref: Align @sentry/node exports from framework SDKs. (#12589)
Aligns (and sorts) explicit exports from `@sentry/node` in Astro / Remix / Sveltekit SDKs. NextJS SDK does not seem to have explicit exports.
1 parent 00ee962 commit dfa863a

File tree

4 files changed

+264
-203
lines changed

4 files changed

+264
-203
lines changed

dev-packages/e2e-tests/test-applications/create-remix-app-express-vite-dev/instrument.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Sentry.init({
77
dsn: process.env.E2E_TEST_DSN,
88
tunnel: 'http://localhost:3031/', // proxy server
99
autoInstrumentRemix: true, // auto instrument Remix
10+
integrations: [Sentry.nativeNodeFetchIntegration()],
1011
});

packages/astro/src/index.server.ts

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -8,117 +8,117 @@ import { handleRequest } from './server/middleware';
88

99
// Hence, we export everything from the Node SDK explicitly:
1010
export {
11-
addEventProcessor,
1211
addBreadcrumb,
13-
captureException,
14-
captureEvent,
15-
captureMessage,
12+
addEventProcessor,
13+
addIntegration,
14+
addOpenTelemetryInstrumentation,
15+
addRequestDataToEvent,
16+
anrIntegration,
1617
captureCheckIn,
18+
captureConsoleIntegration,
19+
captureEvent,
20+
captureException,
1721
captureFeedback,
18-
withMonitor,
22+
captureMessage,
23+
captureSession,
24+
close,
25+
connectIntegration,
26+
consoleIntegration,
27+
contextLinesIntegration,
28+
continueTrace,
29+
createGetModuleFromFilename,
1930
createTransport,
31+
cron,
32+
debugIntegration,
33+
dedupeIntegration,
34+
DEFAULT_USER_INCLUDES,
35+
defaultStackParser,
36+
endSession,
37+
expressErrorHandler,
38+
expressIntegration,
39+
extractRequestData,
40+
extraErrorDataIntegration,
41+
fastifyIntegration,
42+
flush,
43+
functionToStringIntegration,
44+
generateInstrumentOnce,
45+
getActiveSpan,
46+
getAutoPerformanceIntegrations,
47+
getClient,
2048
// eslint-disable-next-line deprecation/deprecation
2149
getCurrentHub,
22-
getClient,
23-
isInitialized,
24-
generateInstrumentOnce,
2550
getCurrentScope,
51+
getDefaultIntegrations,
2652
getGlobalScope,
2753
getIsolationScope,
28-
setCurrentClient,
29-
Scope,
30-
SDK_VERSION,
31-
setContext,
32-
setExtra,
33-
setExtras,
34-
setTag,
35-
setTags,
36-
setUser,
37-
getSpanStatusFromHttpCode,
38-
setHttpStatus,
39-
withScope,
40-
withIsolationScope,
41-
makeNodeTransport,
42-
getDefaultIntegrations,
43-
defaultStackParser,
44-
lastEventId,
45-
flush,
46-
close,
47-
getSentryRelease,
48-
addRequestDataToEvent,
49-
DEFAULT_USER_INCLUDES,
50-
extractRequestData,
51-
consoleIntegration,
52-
onUncaughtExceptionIntegration,
53-
onUnhandledRejectionIntegration,
54-
modulesIntegration,
55-
contextLinesIntegration,
56-
nodeContextIntegration,
57-
localVariablesIntegration,
58-
requestDataIntegration,
59-
functionToStringIntegration,
60-
inboundFiltersIntegration,
61-
linkedErrorsIntegration,
62-
setMeasurement,
63-
getActiveSpan,
6454
getRootSpan,
65-
startSpan,
66-
startInactiveSpan,
67-
startSpanManual,
68-
startNewTrace,
69-
withActiveSpan,
55+
getSentryRelease,
7056
getSpanDescendants,
71-
continueTrace,
72-
cron,
73-
parameterize,
74-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
75-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
76-
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
77-
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
78-
expressIntegration,
79-
expressErrorHandler,
80-
setupExpressErrorHandler,
81-
fastifyIntegration,
57+
getSpanStatusFromHttpCode,
8258
graphqlIntegration,
59+
hapiIntegration,
60+
httpIntegration,
61+
inboundFiltersIntegration,
62+
initOpenTelemetry,
63+
isInitialized,
64+
koaIntegration,
65+
lastEventId,
66+
linkedErrorsIntegration,
67+
localVariablesIntegration,
68+
makeNodeTransport,
69+
metrics,
70+
modulesIntegration,
8371
mongoIntegration,
8472
mongooseIntegration,
85-
mysqlIntegration,
8673
mysql2Integration,
87-
redisIntegration,
74+
mysqlIntegration,
75+
nativeNodeFetchIntegration,
8876
nestIntegration,
89-
setupNestErrorHandler,
77+
NodeClient,
78+
nodeContextIntegration,
79+
onUncaughtExceptionIntegration,
80+
onUnhandledRejectionIntegration,
81+
parameterize,
9082
postgresIntegration,
9183
prismaIntegration,
92-
hapiIntegration,
93-
setupHapiErrorHandler,
94-
spotlightIntegration,
95-
addOpenTelemetryInstrumentation,
96-
metrics,
97-
NodeClient,
98-
addIntegration,
99-
anrIntegration,
100-
captureConsoleIntegration,
101-
captureSession,
102-
connectIntegration,
103-
createGetModuleFromFilename,
104-
debugIntegration,
105-
dedupeIntegration,
106-
endSession,
107-
extraErrorDataIntegration,
108-
getAutoPerformanceIntegrations,
109-
httpIntegration,
110-
initOpenTelemetry,
111-
koaIntegration,
112-
nativeNodeFetchIntegration,
84+
redisIntegration,
85+
requestDataIntegration,
11386
rewriteFramesIntegration,
87+
Scope,
88+
SDK_VERSION,
89+
SEMANTIC_ATTRIBUTE_SENTRY_OP,
90+
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
91+
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
92+
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
11493
sessionTimingIntegration,
94+
setContext,
95+
setCurrentClient,
96+
setExtra,
97+
setExtras,
98+
setHttpStatus,
99+
setMeasurement,
100+
setTag,
101+
setTags,
115102
setupConnectErrorHandler,
103+
setupExpressErrorHandler,
104+
setupHapiErrorHandler,
116105
setupKoaErrorHandler,
106+
setupNestErrorHandler,
107+
setUser,
117108
spanToBaggageHeader,
118109
spanToJSON,
119110
spanToTraceHeader,
111+
spotlightIntegration,
112+
startInactiveSpan,
113+
startNewTrace,
120114
startSession,
115+
startSpan,
116+
startSpanManual,
121117
trpcMiddleware,
118+
withActiveSpan,
119+
withIsolationScope,
120+
withMonitor,
121+
withScope,
122122
zodErrorsIntegration,
123123
} from '@sentry/node';
124124

packages/remix/src/index.server.ts

Lines changed: 88 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -18,98 +18,118 @@ import type { RemixOptions } from './utils/remixOptions';
1818
// We need to explicitly export @sentry/node as they end up under `default` in ESM builds
1919
// See: https://github.com/getsentry/sentry-javascript/issues/8474
2020
export {
21-
addEventProcessor,
2221
addBreadcrumb,
22+
addEventProcessor,
2323
addIntegration,
24+
addOpenTelemetryInstrumentation,
25+
addRequestDataToEvent,
26+
anrIntegration,
2427
captureCheckIn,
25-
withMonitor,
26-
captureException,
28+
captureConsoleIntegration,
2729
captureEvent,
28-
captureMessage,
30+
captureException,
2931
captureFeedback,
32+
captureMessage,
33+
captureSession,
34+
close,
35+
connectIntegration,
36+
consoleIntegration,
37+
contextLinesIntegration,
38+
continueTrace,
39+
createGetModuleFromFilename,
3040
createTransport,
41+
cron,
42+
debugIntegration,
43+
dedupeIntegration,
44+
DEFAULT_USER_INCLUDES,
45+
defaultStackParser,
46+
endSession,
47+
expressErrorHandler,
48+
expressIntegration,
49+
extractRequestData,
50+
extraErrorDataIntegration,
51+
fastifyIntegration,
52+
flush,
53+
functionToStringIntegration,
54+
generateInstrumentOnce,
55+
getActiveSpan,
56+
getAutoPerformanceIntegrations,
57+
getClient,
3158
// eslint-disable-next-line deprecation/deprecation
3259
getCurrentHub,
33-
getClient,
3460
getCurrentScope,
61+
getDefaultIntegrations,
3562
getGlobalScope,
3663
getIsolationScope,
37-
setCurrentClient,
38-
NodeClient,
39-
Scope,
40-
SDK_VERSION,
41-
setContext,
42-
setExtra,
43-
setExtras,
44-
setTag,
45-
setTags,
46-
setUser,
47-
getSpanStatusFromHttpCode,
48-
setHttpStatus,
49-
withScope,
50-
withIsolationScope,
51-
makeNodeTransport,
52-
defaultStackParser,
53-
lastEventId,
54-
flush,
55-
close,
56-
getSentryRelease,
57-
addRequestDataToEvent,
58-
DEFAULT_USER_INCLUDES,
59-
extractRequestData,
60-
consoleIntegration,
61-
onUncaughtExceptionIntegration,
62-
onUnhandledRejectionIntegration,
63-
modulesIntegration,
64-
contextLinesIntegration,
65-
nodeContextIntegration,
66-
localVariablesIntegration,
67-
requestDataIntegration,
68-
functionToStringIntegration,
69-
inboundFiltersIntegration,
70-
linkedErrorsIntegration,
71-
setMeasurement,
72-
getActiveSpan,
7364
getRootSpan,
74-
startSpan,
75-
startSpanManual,
76-
startInactiveSpan,
77-
startNewTrace,
78-
withActiveSpan,
65+
getSentryRelease,
7966
getSpanDescendants,
80-
continueTrace,
67+
getSpanStatusFromHttpCode,
68+
graphqlIntegration,
69+
hapiIntegration,
70+
httpIntegration,
71+
inboundFiltersIntegration,
72+
initOpenTelemetry,
8173
isInitialized,
82-
cron,
83-
parameterize,
74+
koaIntegration,
75+
lastEventId,
76+
linkedErrorsIntegration,
77+
localVariablesIntegration,
78+
makeNodeTransport,
8479
metrics,
85-
createGetModuleFromFilename,
86-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
87-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
88-
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
89-
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
90-
expressIntegration,
91-
expressErrorHandler,
92-
setupExpressErrorHandler,
93-
fastifyIntegration,
94-
graphqlIntegration,
80+
modulesIntegration,
9581
mongoIntegration,
9682
mongooseIntegration,
97-
mysqlIntegration,
9883
mysql2Integration,
99-
redisIntegration,
84+
mysqlIntegration,
85+
nativeNodeFetchIntegration,
10086
nestIntegration,
101-
setupNestErrorHandler,
87+
NodeClient,
88+
nodeContextIntegration,
89+
onUncaughtExceptionIntegration,
90+
onUnhandledRejectionIntegration,
91+
parameterize,
10292
postgresIntegration,
10393
prismaIntegration,
104-
hapiIntegration,
94+
redisIntegration,
95+
requestDataIntegration,
96+
rewriteFramesIntegration,
97+
Scope,
98+
SDK_VERSION,
99+
SEMANTIC_ATTRIBUTE_SENTRY_OP,
100+
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
101+
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
102+
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
103+
sessionTimingIntegration,
104+
setContext,
105+
setCurrentClient,
106+
setExtra,
107+
setExtras,
108+
setHttpStatus,
109+
setMeasurement,
110+
setTag,
111+
setTags,
112+
setupConnectErrorHandler,
113+
setupExpressErrorHandler,
105114
setupHapiErrorHandler,
106-
spotlightIntegration,
107-
setupFastifyErrorHandler,
108-
trpcMiddleware,
115+
setupKoaErrorHandler,
116+
setupNestErrorHandler,
117+
setUser,
118+
spanToBaggageHeader,
109119
spanToJSON,
110120
spanToTraceHeader,
111-
spanToBaggageHeader,
112-
addOpenTelemetryInstrumentation,
121+
spotlightIntegration,
122+
startInactiveSpan,
123+
startNewTrace,
124+
startSession,
125+
startSpan,
126+
startSpanManual,
127+
trpcMiddleware,
128+
withActiveSpan,
129+
withIsolationScope,
130+
withMonitor,
131+
withScope,
132+
zodErrorsIntegration,
113133
} from '@sentry/node';
114134

115135
// Keeping the `*` exports for backwards compatibility and types

0 commit comments

Comments
 (0)