Console errors are not captured with custom client and hub
See original GitHub issuePackage + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Version:
5.15.5
Description
<script src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js" integrity="sha384-wF7Jc4ZlWVxe/L8Ji3hOIBeTgo/HwFuaeEfjGmS3EXAG7Y+7Kjjr91gJpJtr+PAT" crossorigin="anonymous"></script>
<script src="https://browser.sentry-cdn.com/5.15.5/reportingobserver.min.js" crossorigin="anonymous"></script>
<script src="https://browser.sentry-cdn.com/5.15.5/captureconsole.min.js" crossorigin="anonymous"></script>
<script src="https://browser.sentry-cdn.com/5.15.5/dedupe.min.js" crossorigin="anonymous"></script>
var SentryClientGlobal = new Sentry.BrowserClient({
environment: 'development',
dsn: 'secret',
integrations: [
...Sentry.defaultIntegrations,
new Sentry.Integrations.ReportingObserver(),
new Sentry.Integrations.CaptureConsole({
levels: ['error', 'warn']
}),
new Sentry.Integrations.Dedupe()
]
}),
SentryHubGlobal = new Sentry.Hub(SentryClientGlobal);
// Capture additional data
SentryHubGlobal.configureScope(function(scope) {
scope.setTag("siteid", SITEID);
scope.setTag('cID', CID);
if (LOGGED_IN) {
scope.setUser({ id: "<?= $u->uID ?>" });
}
});
console.error('Boom!'); // this is not captured in Sentry
Initializing a client and hub manually like this doesn’t capture the console errors that are otherwise logged if I just use Sentry.init()
and Sentry.configureScope
normally as mentioned in the docs.
What am I doing wrong here or is it a bug?
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Console errors are not captured with custom client and hub
Initializing a client and hub manually like this doesn't capture the console errors that are otherwise logged if I just use Sentry.init() and ......
Read more >Capture console JS errors - Browser - New Relic Explorers Hub
Hello, I am tracking JS errors using New Relic but just realized it only captures thrown errors. Is there anyway to intercept the...
Read more >How to handle SignalR server exception at client?
I tested on a little chat project (downloaded here) it seems this method handle only connection errors.
Read more >Identify and resolve client errors
Identify client errors and resolve them in client-side scripts. ... Build a custom template from an existing application.
Read more >Fix JavaScript errors that are reported in the Console
But no h2 element exists, so the script fails. Find and debug network issues. The Console also reports network errors. Demo page: Network...
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 FreeTop 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
Top GitHub Comments
Got it. And excuse me the long response time, I’ll try to be more responsive next time.
@3zzy definitely! Coming in the next release 😃