Using withScope with the Lazy Loader
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
- Provide a link to the affected event from your Sentry account Not checked because it does not exist
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other: Loader
Version:
Latest
Description
Because the full Sentry script is only injected with a call to capture
or an error is captured on the page, code like this below will (virtually) never execute.
Sentry.withScope((scope) => {
scope.setLevel('warning')
Sentry.captureException(error)
})
In particular, withScope
will simply get placed on the queue, and unless an error occurs or you call Sentry.forceLoad()
right after, it will not bubble up to Sentry.
I think at the very least the documentation should make a note of this. Potentially though, withScope
should trigger an inject as well.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Use lazy loading to improve loading speed - web.dev
This post explains lazy loading and why you might want to lazy-load elements on your site.
Read more >Ng-repeat and Native scrolling creating issue with scope loading ...
This issue happens on hybrid app. The longer list (and images) the more lag it has. As I can see you are using...
Read more >Javascript – Working example of datatables with lazy loading of ...
I'm looking for a working example of lazy-loading of images within datatables ... The method I've had the most success with uses the...
Read more >Lazy-Loading Sentry for JavaScript
When to load the SDK. SDK Version. To configure the version, use the dropdown in the JavaScript Loader settings, directly beneath the script...
Read more >Eloquent: Getting Started - Laravel - The PHP Framework For ...
If you need to eager load relationships, consider using the lazy method instead. Internally, the cursor method uses PHP generators to implement ...
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
I’m having the same problem, I guess I’ll just have to call forceLoad
I have the same issue.