Skip to content

Sentry Angular allow only manual exception #6974

Answered by AbhiPrasad
Dhan3777 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Dhan3777 - thanks for writing in. To disable automatic instrumentation for errors you can remove the integrations that do this.

See: https://docs.sentry.io/platforms/javascript/guides/angular/configuration/integrations/default/#removing-an-integration on how to remove an integration.

Specifically you'll have to remove the TryCatch and GlobalHandlers integrations.

Sentry.init({
  // ...

  integrations: function(integrations) {
    // integrations will be all default integrations
    return integrations.filter(function(integration) {
      return integration.name !== "TryCatch" || integration.name !== "GlobalHandlers";
    });
  },
});

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by AbhiPrasad
Comment options

You must be logged in to vote
1 reply
@AbhiPrasad
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@AbhiPrasad
Comment options

@Dhan3777
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants