How to disable Sentry again at runtime?
See original GitHub issue- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Description
We allow to enable or disable error reporting in our browser extension (which is needed for GDPR). A browser extensions background script is long-running (doesn’t re-run at page reloads), so when error reporting is disabled, we need to disable Sentry after it was already enabled with Sentry.init()
. I see there is Sentry.init({ enabled: false })
but it doesn’t look legal to call Sentry.init()
twice. How can I disable Sentry after it was enabled before, at runtime?
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Disabling/re-enabling sentry at runtime (raven-js) - SDKs
Hi there. This is specific to raven-js usage. tl;dr: Is there any way to call Raven.config again and change some options for a...
Read more >Dynamically enable and disable sentry without stopping ...
Is there a better way, am I missing something? You can call init(None) to disable the SDK, and then run your old init()...
Read more >Sentry Mode - Tesla
Sentry Mode is Off when the icon is no longer red. Turn Sentry Mode Off in Controls > Safety > Sentry Mode to...
Read more >Using the Dgraph Sentry Integration - Howto
Sentry is a powerful service that allows applications to send arbitrary events, messages, exceptions, bread-crumbs (logs) to your sentry account.
Read more >Routing Alerts - Sentry Documentation
Alert notifications in Sentry can be routed to Slack, multiple supported ... Users can disable or enable all Project Alerts & Workflow Notifications...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As described in the issue description, we need to allow users to opt in and out of error reporting for privacy reasons. Anything that is unclear? Happy to provide more info but not sure what you are looking for
What’s your use-case specifically? It’s already possible to conditionally drop and/or enable/disable sdk.