For non-Vue consumers only - see the class-level note.
@sentry/browser is dynamically imported here rather than at module
scope, so a consumer that only ever calls resolveConfig() (the
documented Vue path) never pulls @sentry/browser into their bundle at
all - a static top-level import would have been kept by any bundler
the moment InitializeSentry is imported at all, since bundlers don't
tree-shake unused class methods.
Returns null when Sentry should stay off (no DSN, or a disabled environment).
Resolves Sentry configuration (DSN gating, sample rates) and, for a plain (non-Vue) consumer, initializes
@sentry/browserdirectly.Deliberately narrower than the three ported source copies: all three (
luv-autoq-frontend,ama-deep,data-sheet-portal) call@sentry/vue'sSentry.init({ app, ... })withbrowserTracingIntegration({ router })- i.e. they need a VueAppinstance and a Vue Router instance, which makes the originalInitializeSentryVue-specific despite living in a "framework-agnostic" tools package. That coupling doesn't belong here.Instead, this class only computes the config (DSN/environment gating, sample rates,
tracePropagationTargets) as a plain object viaresolveConfig(). A Vue app should callresolveConfig()and pass the result to@sentry/vue's ownSentry.init, adding its ownapp/integrations(see@polargold/pg-frontend-vue, which is expected to provide a thininitializeSentryVue(app, router, options)wrapper on top of this).initialize()here is for non-Vue consumers (e.g. this package's own test suite, or a future non-Vue app) that just want plain@sentry/browsererror capture with no framework tracing integration.