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.

Possible to include multiple instances of Raven on the page?

See original GitHub issue

I have a web service called app that uses raven-js. I’m developing a client-side library that, ideally, would log internal errors to its own Sentry project rather than app’s. But, it would ideally not include its own copy of raven-js, rather specify that Raven is an external dependency to be fulfilled by app.

However, raven-js’ configuration makes it seem global to uses of the library. Is it possible to instantiate the library multiple times with different DSNs?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
benvinegarcommented, Jan 23, 2017

please don’t remove it

We intentionally re-wrote the Raven library to work this way in late 2015 (it was previously all global), so I doubt it will change.

My remaining question is, do both instances need to call install()?

Yes.

Is it safe for them to both do so?

Take a look at the tests; they’re all written against instances.

0reactions
wearherecommented, Jan 23, 2017

Terrific, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 7 Large Datasets
In a paged sound window, Raven loads only a specified amount of the sound, called a page, into memory at one time. The...
Read more >
Frequently Asked Questions
Have questions about Raven Cloud or Raven Scanner? Our frequently asked questions (FAQs) provide detailed answers to commonly asked questions.
Read more >
Usage
Raven will automatically catch and report any unhandled errors originating inside this function (or anything it calls, etc), so you don't have to...
Read more >
Raven Development Tips - WordPress Websites For ...
In Raven, we are using modules for managing elements. Usually, every element/widget is managed by a specific module and a module can manage ......
Read more >
The Raven by Edgar Allan Poe
Throughout, Poe uses repetition more broadly as well. For example, his use of parallelism in line structure and wording, as well as punctuation....
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