Skip to content

ref(tracing): Re-add BrowserTracing static ID #7721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/tracing-internal/src/browser/browsertracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,19 @@ const DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {
* any routing library. This integration uses {@see IdleTransaction} to create transactions.
*/
export class BrowserTracing implements Integration {
// This class currently doesn't have a static `id` field like the other integration classes, because it prevented
// @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.
// TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all
// integrations.

/** Browser Tracing integration options */
public options: BrowserTracingOptions;
/**
* @inheritDoc
*/
public static id: string = BROWSER_TRACING_INTEGRATION_ID;

/**
* @inheritDoc
*/
public name: string = BROWSER_TRACING_INTEGRATION_ID;

/** Browser Tracing integration options */
public options: BrowserTracingOptions;

private _getCurrentHub?: () => Hub;

private _latestRouteName?: string;
Expand Down