UNPKG

@sentry/remix

Version:
25 lines (22 loc) • 985 B
import { getDefaultIntegrations as getDefaultIntegrations$1, init as init$1 } from '@sentry/browser'; import { applySdkMetadata } from '@sentry/core'; import { browserTracingIntegration } from './browserTracingIntegration.js'; import { instrumentClientRuntime } from './errors.js'; import { createRemixV3RouteProvider } from './routeProvider.js'; function getDefaultIntegrations(options) { return [...getDefaultIntegrations$1(options), 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: createRemixV3RouteProvider(), ...options, defaultIntegrations: options.defaultIntegrations ?? getDefaultIntegrations(options) }; applySdkMetadata(opts, "remix", ["remix", "browser"]); const client = init$1(opts); instrumentClientRuntime(); return client; } export { getDefaultIntegrations, init }; //# sourceMappingURL=sdk.js.map