UNPKG

@sentry/remix

Version:
28 lines (24 loc) • 1.06 kB
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const browser = require('@sentry/browser'); const core = require('@sentry/core'); const browserTracingIntegration = require('./browserTracingIntegration.js'); const errors = require('./errors.js'); const routeProvider = require('./routeProvider.js'); function getDefaultIntegrations(options) { return [...browser.getDefaultIntegrations(options), browserTracingIntegration.browserTracingIntegration()]; } function init(options) { const opts = { // Set at `init` so the page load span can be named from it. An app with its own provider keeps it. routeProvider: routeProvider.createRemixV3RouteProvider(), ...options, defaultIntegrations: options.defaultIntegrations ?? getDefaultIntegrations(options) }; core.applySdkMetadata(opts, "remix", ["remix", "browser"]); const client = browser.init(opts); errors.instrumentClientRuntime(); return client; } exports.getDefaultIntegrations = getDefaultIntegrations; exports.init = init; //# sourceMappingURL=sdk.js.map