question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: ability to fully disable Raven for local development

See original GitHub issue

I’d like to fully disable Raven for local development. Raven-node does this by allowing null to be passed for the DSN: https://github.com/getsentry/raven-node#user-content-disable-raven

However, this doesn’t work in raven-js because then I get the error Error: Raven has not been configured every time my code calls captureMessage. It would be nice if raven-js special-cased a null DSN as disabling Raven altogether, with no error message.

My current workaround is to wrap Raven.captureMessage in a function that checks if I’m on the local environment. I also conditionally call the install() method.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
bradvogelcommented, Sep 19, 2014

I guess this feature request is just asking to suppress that error message if debug: true. Otherwise I need to do:

var clientDSN = MyEnvironment.isLocal() ? false /* Disable */ : 'https://<key>@app.getsentry.com/30415';
Raven.config(clientDSN, {});

// Suppress the 'Error: Raven not configured' when disabled on localhost.
Raven.debug = false;

// Install after 'debug' has been disabled.
Raven.install();
1reaction
bradvogelcommented, Sep 19, 2014

Seems strange then that debug is enabled by default?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Magisk Patched Unofficial GrapheneOS for the Pixel 6 / 6 Pro ...
Magisk Patched Unofficial GrapheneOS for the Pixel 6 / 6 Pro (oriole/raven) This ROM will allow you to lock the boot loader.
Read more >
Raven Pro 1.4 User's Manual
Raven artwork by Diane Tessaglia-Hymes. The Raven development project is led by Tim Krein and is under the general direction of Christopher W....
Read more >
Installation: Setup Wizard Walkthrough - RavenDB
Setting up securely will create a development environment that includes security related features such as encryption and client certificates.
Read more >
Raven FAQs | IT Help and Support - University of Cambridge
Questions about access to, and use of, Raven. ... A regular newsletter aimed at the University's IT community, highlighting service and project news...
Read more >
serverless-sentry-lib - npm
Sentry/Raven SDK Integration For AWS Lambda and Serverless ... We use exclusively Node 4.3 features to ensure this code can run on AWS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found