Skip to content

@sentry/tracing Integrations can't be tree-shaked effectively #3310

Closed
@osdiab

Description

@osdiab

Package + Version

  • @sentry/browser
  • @sentry/node
  • raven-js
  • raven-node (raven for node)
  • other: @sentry/tracing 6.2.0

Description

Instead of being able to import { BrowserTracing } from "@sentry/tracing" directly, you need to import { Integrations } from "@sentry/tracing", and then get it via Integrations.BrowserTracing.

The result is that my bundle, despite having tree-shaking turned on, ends up including all the integrations, including mongo, postgres, etc - totally irrelevant to my browser web-app.

To avoid a breaking change I suggest just also exporting all the integrations as named members from the @sentry/tracing package, or alternatively exporting them from a separate sub-package like @sentry/tracing/integrations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions