Skip to content

BrowserTracing id property missing in v7 #5647

@AbhiPrasad

Description

@AbhiPrasad

Discussed in #5635

Originally posted by martinkwan August 26, 2022
Hi, I am trying to check if Sentry's APM is initialized with this line of code.

import * as Sentry from '@sentry/react';
import {Integrations as TracingIntegrations} from '@sentry/tracing';

Sentry.getCurrentHub()
      .getClient()
      ?.getIntegration(TracingIntegrations.BrowserTracing)

This worked in v6, but while migrating to v7 BrowserTracing removed it's ID property and now Typescript is giving me this error:

Argument of type 'typeof BrowserTracing' is not assignable to parameter of type 'IntegrationClass<BrowserTracing>'.
  Property 'id' is missing in type 'typeof BrowserTracing' but required in type 'IntegrationClass<BrowserTracing>'.

Is there fix for this typescript error? I know the static property id is removed in v7 from BrowserTracing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions