Skip to content

Commit

Permalink
ref: Align @sentry/node exports from framework SDKs. (#12589)
Browse files Browse the repository at this point in the history
Aligns (and sorts) explicit exports from `@sentry/node` in Astro / Remix
/ Sveltekit SDKs. NextJS SDK does not seem to have explicit exports.
  • Loading branch information
onurtemizkan authored Jun 20, 2024
1 parent 00ee962 commit dfa863a
Show file tree
Hide file tree
Showing 4 changed files with 264 additions and 203 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ Sentry.init({
dsn: process.env.E2E_TEST_DSN,
tunnel: 'http://localhost:3031/', // proxy server
autoInstrumentRemix: true, // auto instrument Remix
integrations: [Sentry.nativeNodeFetchIntegration()],
});
168 changes: 84 additions & 84 deletions packages/astro/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,117 +8,117 @@ import { handleRequest } from './server/middleware';

// Hence, we export everything from the Node SDK explicitly:
export {
addEventProcessor,
addBreadcrumb,
captureException,
captureEvent,
captureMessage,
addEventProcessor,
addIntegration,
addOpenTelemetryInstrumentation,
addRequestDataToEvent,
anrIntegration,
captureCheckIn,
captureConsoleIntegration,
captureEvent,
captureException,
captureFeedback,
withMonitor,
captureMessage,
captureSession,
close,
connectIntegration,
consoleIntegration,
contextLinesIntegration,
continueTrace,
createGetModuleFromFilename,
createTransport,
cron,
debugIntegration,
dedupeIntegration,
DEFAULT_USER_INCLUDES,
defaultStackParser,
endSession,
expressErrorHandler,
expressIntegration,
extractRequestData,
extraErrorDataIntegration,
fastifyIntegration,
flush,
functionToStringIntegration,
generateInstrumentOnce,
getActiveSpan,
getAutoPerformanceIntegrations,
getClient,
// eslint-disable-next-line deprecation/deprecation
getCurrentHub,
getClient,
isInitialized,
generateInstrumentOnce,
getCurrentScope,
getDefaultIntegrations,
getGlobalScope,
getIsolationScope,
setCurrentClient,
Scope,
SDK_VERSION,
setContext,
setExtra,
setExtras,
setTag,
setTags,
setUser,
getSpanStatusFromHttpCode,
setHttpStatus,
withScope,
withIsolationScope,
makeNodeTransport,
getDefaultIntegrations,
defaultStackParser,
lastEventId,
flush,
close,
getSentryRelease,
addRequestDataToEvent,
DEFAULT_USER_INCLUDES,
extractRequestData,
consoleIntegration,
onUncaughtExceptionIntegration,
onUnhandledRejectionIntegration,
modulesIntegration,
contextLinesIntegration,
nodeContextIntegration,
localVariablesIntegration,
requestDataIntegration,
functionToStringIntegration,
inboundFiltersIntegration,
linkedErrorsIntegration,
setMeasurement,
getActiveSpan,
getRootSpan,
startSpan,
startInactiveSpan,
startSpanManual,
startNewTrace,
withActiveSpan,
getSentryRelease,
getSpanDescendants,
continueTrace,
cron,
parameterize,
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
expressIntegration,
expressErrorHandler,
setupExpressErrorHandler,
fastifyIntegration,
getSpanStatusFromHttpCode,
graphqlIntegration,
hapiIntegration,
httpIntegration,
inboundFiltersIntegration,
initOpenTelemetry,
isInitialized,
koaIntegration,
lastEventId,
linkedErrorsIntegration,
localVariablesIntegration,
makeNodeTransport,
metrics,
modulesIntegration,
mongoIntegration,
mongooseIntegration,
mysqlIntegration,
mysql2Integration,
redisIntegration,
mysqlIntegration,
nativeNodeFetchIntegration,
nestIntegration,
setupNestErrorHandler,
NodeClient,
nodeContextIntegration,
onUncaughtExceptionIntegration,
onUnhandledRejectionIntegration,
parameterize,
postgresIntegration,
prismaIntegration,
hapiIntegration,
setupHapiErrorHandler,
spotlightIntegration,
addOpenTelemetryInstrumentation,
metrics,
NodeClient,
addIntegration,
anrIntegration,
captureConsoleIntegration,
captureSession,
connectIntegration,
createGetModuleFromFilename,
debugIntegration,
dedupeIntegration,
endSession,
extraErrorDataIntegration,
getAutoPerformanceIntegrations,
httpIntegration,
initOpenTelemetry,
koaIntegration,
nativeNodeFetchIntegration,
redisIntegration,
requestDataIntegration,
rewriteFramesIntegration,
Scope,
SDK_VERSION,
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
sessionTimingIntegration,
setContext,
setCurrentClient,
setExtra,
setExtras,
setHttpStatus,
setMeasurement,
setTag,
setTags,
setupConnectErrorHandler,
setupExpressErrorHandler,
setupHapiErrorHandler,
setupKoaErrorHandler,
setupNestErrorHandler,
setUser,
spanToBaggageHeader,
spanToJSON,
spanToTraceHeader,
spotlightIntegration,
startInactiveSpan,
startNewTrace,
startSession,
startSpan,
startSpanManual,
trpcMiddleware,
withActiveSpan,
withIsolationScope,
withMonitor,
withScope,
zodErrorsIntegration,
} from '@sentry/node';

Expand Down
156 changes: 88 additions & 68 deletions packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,98 +18,118 @@ import type { RemixOptions } from './utils/remixOptions';
// We need to explicitly export @sentry/node as they end up under `default` in ESM builds
// See: https://github.com/getsentry/sentry-javascript/issues/8474
export {
addEventProcessor,
addBreadcrumb,
addEventProcessor,
addIntegration,
addOpenTelemetryInstrumentation,
addRequestDataToEvent,
anrIntegration,
captureCheckIn,
withMonitor,
captureException,
captureConsoleIntegration,
captureEvent,
captureMessage,
captureException,
captureFeedback,
captureMessage,
captureSession,
close,
connectIntegration,
consoleIntegration,
contextLinesIntegration,
continueTrace,
createGetModuleFromFilename,
createTransport,
cron,
debugIntegration,
dedupeIntegration,
DEFAULT_USER_INCLUDES,
defaultStackParser,
endSession,
expressErrorHandler,
expressIntegration,
extractRequestData,
extraErrorDataIntegration,
fastifyIntegration,
flush,
functionToStringIntegration,
generateInstrumentOnce,
getActiveSpan,
getAutoPerformanceIntegrations,
getClient,
// eslint-disable-next-line deprecation/deprecation
getCurrentHub,
getClient,
getCurrentScope,
getDefaultIntegrations,
getGlobalScope,
getIsolationScope,
setCurrentClient,
NodeClient,
Scope,
SDK_VERSION,
setContext,
setExtra,
setExtras,
setTag,
setTags,
setUser,
getSpanStatusFromHttpCode,
setHttpStatus,
withScope,
withIsolationScope,
makeNodeTransport,
defaultStackParser,
lastEventId,
flush,
close,
getSentryRelease,
addRequestDataToEvent,
DEFAULT_USER_INCLUDES,
extractRequestData,
consoleIntegration,
onUncaughtExceptionIntegration,
onUnhandledRejectionIntegration,
modulesIntegration,
contextLinesIntegration,
nodeContextIntegration,
localVariablesIntegration,
requestDataIntegration,
functionToStringIntegration,
inboundFiltersIntegration,
linkedErrorsIntegration,
setMeasurement,
getActiveSpan,
getRootSpan,
startSpan,
startSpanManual,
startInactiveSpan,
startNewTrace,
withActiveSpan,
getSentryRelease,
getSpanDescendants,
continueTrace,
getSpanStatusFromHttpCode,
graphqlIntegration,
hapiIntegration,
httpIntegration,
inboundFiltersIntegration,
initOpenTelemetry,
isInitialized,
cron,
parameterize,
koaIntegration,
lastEventId,
linkedErrorsIntegration,
localVariablesIntegration,
makeNodeTransport,
metrics,
createGetModuleFromFilename,
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
expressIntegration,
expressErrorHandler,
setupExpressErrorHandler,
fastifyIntegration,
graphqlIntegration,
modulesIntegration,
mongoIntegration,
mongooseIntegration,
mysqlIntegration,
mysql2Integration,
redisIntegration,
mysqlIntegration,
nativeNodeFetchIntegration,
nestIntegration,
setupNestErrorHandler,
NodeClient,
nodeContextIntegration,
onUncaughtExceptionIntegration,
onUnhandledRejectionIntegration,
parameterize,
postgresIntegration,
prismaIntegration,
hapiIntegration,
redisIntegration,
requestDataIntegration,
rewriteFramesIntegration,
Scope,
SDK_VERSION,
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
sessionTimingIntegration,
setContext,
setCurrentClient,
setExtra,
setExtras,
setHttpStatus,
setMeasurement,
setTag,
setTags,
setupConnectErrorHandler,
setupExpressErrorHandler,
setupHapiErrorHandler,
spotlightIntegration,
setupFastifyErrorHandler,
trpcMiddleware,
setupKoaErrorHandler,
setupNestErrorHandler,
setUser,
spanToBaggageHeader,
spanToJSON,
spanToTraceHeader,
spanToBaggageHeader,
addOpenTelemetryInstrumentation,
spotlightIntegration,
startInactiveSpan,
startNewTrace,
startSession,
startSpan,
startSpanManual,
trpcMiddleware,
withActiveSpan,
withIsolationScope,
withMonitor,
withScope,
zodErrorsIntegration,
} from '@sentry/node';

// Keeping the `*` exports for backwards compatibility and types
Expand Down
Loading

0 comments on commit dfa863a

Please sign in to comment.