Skip to content

initWithoutDefaultIntegrations and getDefaultIntegrationsWithoutPerformance methods for @sentry/bun #14504

Closed

Description

@Thanaen

Problem Statement

@sentry/node calls the “initWithoutDefaultIntegrations” method combined with “getDefaultIntegrationsWithoutPerformance” to initialize Sentry in “error handling” mode only.

It would appear that the @sentry/bun package does not expose these methods, but @sentry/bun users would also benefit from them.

Would it be possible to add them?

An alternative solution would be to use @sentry/node with bun, but I'm not sure about the side effects.

Thanks!

Solution Brainstorm

Add “initWithoutDefaultIntegrations” and “getDefaultIntegrationsWithoutPerformance” methods to @sentry/bun

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Nov 27, 2024
  2. Thanaen commented on Nov 27, 2024

    @Thanaen
    Author

    (The purpose of this feature would be to reduce Sentry's impact on bun performance, as mentioned in this issue: #12561)

  3. chargome commented on Nov 27, 2024

    @chargome
    Member

    Hi @Thanaen, thanks for reaching out. You could just filter the integrations based on your needs like this:

    Sentry.init({
      // ...
      integrations: function (integrations) {
        // integrations will be all default integrations
        return integrations.filter(function (integration) {
          return integration.name !== "Breadcrumbs";
        });
      },
    });

    docs here

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Nov 27, 2024
  5. Thanaen commented on Nov 27, 2024

    @Thanaen
    Author

    This could be a good workaround, even if it's less simple to use than the methods provided for Node.js!

    Does it allow tree-shaking of disabled integrations?

  6. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Nov 27, 2024
  7. chargome commented on Nov 27, 2024

    @chargome
    Member

    @Thanaen yes this should be tree-shakable unfortunately this would not be treeshakable. You would need to provide your own client instead, similar to https://docs.sentry.io/platforms/javascript/configuration/tree-shaking/#tree-shaking-default-integrations. In your case this would be a BunClient though. Sorry for the confusion!

  8. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Nov 27, 2024
  9. Thanaen commented on Nov 27, 2024

    @Thanaen
    Author

    Ok!

    This means that Sentry users who use Bun should maintain a list of integrations to disable if they don't want to use tracing and performance analysis, it's not ideal, but I can live with it for now

  10. 6 remaining items

  11. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Dec 2, 2024
  12. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Dec 2, 2024
  13. added a commit that references this issue on Jul 15, 2026
    b8e941f
  14. github-actions commented on Jul 16, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #22036, which was included in the 10.66.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions