@polargold/pg-frontend-core
    Preparing search index...

    Class InitializeSentry

    Resolves Sentry configuration (DSN gating, sample rates) and, for a plain (non-Vue) consumer, initializes @sentry/browser directly.

    Deliberately narrower than the three ported source copies: all three (luv-autoq-frontend, ama-deep, data-sheet-portal) call @sentry/vue's Sentry.init({ app, ... }) with browserTracingIntegration({ router }) - i.e. they need a Vue App instance and a Vue Router instance, which makes the original InitializeSentry Vue-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 via resolveConfig(). A Vue app should call resolveConfig() and pass the result to @sentry/vue's own Sentry.init, adding its own app/integrations (see @polargold/pg-frontend-vue, which is expected to provide a thin initializeSentryVue(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/browser error capture with no framework tracing integration.

    Index
    • 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 Promise<void>