@sentry/remix
Version:
Official Sentry SDK for Remix
36 lines (27 loc) • 1.02 kB
JavaScript
import { getCurrentHub, init as init$1, configureScope } 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 { BrowserTracing, Integrations } from '@sentry/tracing';
function sdkAlreadyInitialized() {
var 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