UNPKG

@sentry/remix

Version:
46 lines (36 loc) 1.38 kB
Object.defineProperty(exports, '__esModule', { value: true }); var node = require('@sentry/node'); var utils = require('@sentry/utils'); var instrumentServer = require('./utils/instrumentServer.js'); var metadata = require('./utils/metadata.js'); var react = require('@sentry/react'); var client = require('./performance/client.js'); var tracing = require('@sentry/tracing'); function sdkAlreadyInitialized() { var hub = node.getCurrentHub(); return !!hub.getClient(); } /** Initializes Sentry Remix SDK on Node. */ function init(options) { metadata.buildMetadata(options, ['remix', 'node']); if (sdkAlreadyInitialized()) { (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log('SDK already initialized'); return; } instrumentServer.instrumentServer(); node.init(options); node.configureScope(scope => { scope.setTag('runtime', 'node'); }); } exports.ErrorBoundary = react.ErrorBoundary; exports.withErrorBoundary = react.withErrorBoundary; exports.remixRouterInstrumentation = client.remixRouterInstrumentation; exports.withSentry = client.withSentry; exports.BrowserTracing = tracing.BrowserTracing; exports.Integrations = tracing.Integrations; exports.init = init; for (var k in node) { if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = node[k]; } //# sourceMappingURL=index.server.js.map