UNPKG

@sentry/remix

Version:
38 lines (28 loc) • 1.08 kB
import { init as init$1, configureScope, getCurrentHub } from '@sentry/node'; export * from '@sentry/node'; import { logger } from '@sentry/utils'; import { instrumentServer } from './utils/instrumentServer.js'; import { buildMetadata } from './utils/metadata.js'; export { ErrorBoundary, withErrorBoundary } from '@sentry/react'; export { remixRouterInstrumentation, withSentry } from './performance/client.js'; export { wrapExpressCreateRequestHandler } from './utils/serverAdapters/express.js'; /* eslint-disable import/export */ function sdkAlreadyInitialized() { const hub = getCurrentHub(); return !!hub.getClient(); } /** Initializes Sentry Remix SDK on Node. */ function init(options) { buildMetadata(options, ['remix', 'node']); if (sdkAlreadyInitialized()) { (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('SDK already initialized'); return; } instrumentServer(); init$1(options); configureScope(scope => { scope.setTag('runtime', 'node'); }); } export { init }; //# sourceMappingURL=index.server.js.map