Skip to content

eslint(import/namespace): error 'BrowserTracing' not found in imported namespace 'Sentry' #9728

Closed as not planned
@brettdh

Description

@brettdh

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/remix

SDK Version

7.84.0

Framework Version

Remix 2.1.0

Link to Sentry event

n/a

SDK Setup

  Sentry.init({
    dsn: window.SENTRY_DSN,
    environment: window.SENTRY_ENVIRONMENT,
    tunnel: "/api/internal/sentry_proxy",
    tracesSampleRate: 1,
    replaysSessionSampleRate: 0.1,
    replaysOnErrorSampleRate: 1,

    beforeSend(event) {
      if (event.exception) {
        errorHook(event)
      }
      return event
    },

    integrations: [
      new Sentry.BrowserTracing({
        routingInstrumentation: Sentry.remixRouterInstrumentation(
          useEffect,
          useLocation,
          useMatches,
        ),
      }),
      new Sentry.Replay({
        maskAllText: false,
        maskAllInputs: false,
        blockAllMedia: false,
      }),
    ],
  })

Steps to Reproduce

  1. Configure Remix SDK as described in the setup guide (mine above has some small additions)
  2. Run eslint with recommended config

Expected Result

No eslint error

Actual Result

Some variation of #4569 and #6705:

  32:18  error  'BrowserTracing' not found in imported namespace 'Sentry'  import/namespace
  39:18  error  'Replay' not found in imported namespace 'Sentry'          import/namespace

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: remixIssues related to the Sentry Remix SDK

    Type

    No type

    Projects

    Status

    No status

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions