Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remix): Add explicit @sentry/node exports. #8509

Merged
merged 2 commits into from
Jul 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
48 changes: 47 additions & 1 deletion packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,55 @@ import { instrumentServer } from './utils/instrumentServer';
import { buildMetadata } from './utils/metadata';
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 {
addGlobalEventProcessor,
addBreadcrumb,
captureException,
onurtemizkan marked this conversation as resolved.
Show resolved Hide resolved
captureEvent,
captureMessage,
configureScope,
createTransport,
extractTraceparentData,
getActiveTransaction,
getHubFromCarrier,
getCurrentHub,
Hub,
makeMain,
Scope,
startTransaction,
SDK_VERSION,
setContext,
setExtra,
setExtras,
setTag,
setTags,
setUser,
spanStatusfromHttpCode,
trace,
withScope,
autoDiscoverNodePerformanceMonitoringIntegrations,
makeNodeTransport,
defaultIntegrations,
defaultStackParser,
lastEventId,
flush,
close,
getSentryRelease,
addRequestDataToEvent,
DEFAULT_USER_INCLUDES,
extractRequestData,
deepReadDirSync,
Integrations,
Handlers,
} from '@sentry/node';

// Keeping the `*` exports for backwards compatibility and types
export * from '@sentry/node';

export { ErrorBoundary, withErrorBoundary } from '@sentry/react';
export { remixRouterInstrumentation, withSentry } from './performance/client';
export * from '@sentry/node';
export { wrapExpressCreateRequestHandler } from './utils/serverAdapters/express';

function sdkAlreadyInitialized(): boolean {
Expand Down