Gathering detailed insights and metrics for @sentry/electron
Gathering detailed insights and metrics for @sentry/electron
Gathering detailed insights and metrics for @sentry/electron
Gathering detailed insights and metrics for @sentry/electron
npm install @sentry/electron
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
226 Stars
825 Commits
58 Forks
44 Watching
9 Branches
264 Contributors
Updated on 26 Nov 2024
Minified
Minified + Gzipped
TypeScript (75.49%)
JavaScript (18.44%)
HTML (5.97%)
Shell (0.1%)
Cumulative downloads
Total Downloads
Last day
-0.7%
28,974
Compared to previous day
Last week
9.2%
150,465
Compared to previous week
Last month
35.8%
633,297
Compared to previous month
Last year
9.3%
5,440,653
Compared to previous year
27
@sentry/node
)@sentry/browser
)electron >= v15
To use this SDK, call init(options)
as early as possible in the entry modules in the main process as well as all
renderer processes or further sub processes you spawn. This will initialize the SDK and hook the environment.
In the Electron main process:
1import { init } from '@sentry/electron/main'; 2 3init({ 4 dsn: '__DSN__', 5 // ... 6});
In all Electron renderer processes:
1// In the Electron renderer processes 2import { init } from '@sentry/electron/renderer'; 3 4init();
If you are using a framework specific Sentry SDK, you can pass that init
function as the second parameter in the
renderer and the two SDKs functionalities will be combined:
1import { init } from '@sentry/electron/renderer'; 2import { init as reactInit } from '@sentry/react'; 3 4init({ /* config */ }, reactInit); 5
To set context information or send manual events, use the exported functions of @sentry/electron
. Note that these
functions will not perform any action before you have called init()
:
1import * as Sentry from '@sentry/electron/main'; 2 3// Set user information, as well as tags and further extras 4const scope = Sentry.getCurrentScope(); 5scope.setExtra('battery', 0.7); 6scope.setTag('user_mode', 'admin'); 7scope.setUser({ id: '4711' }); 8 9// Add a breadcrumb for future events 10Sentry.addBreadcrumb({ 11 message: 'My Breadcrumb', 12 // ... 13}); 14 15// Capture exceptions, messages or manual events 16Sentry.captureMessage('Hello, world!'); 17Sentry.captureException(new Error('Good bye')); 18Sentry.captureEvent({ 19 message: 'Manual', 20 stacktrace: [ 21 // ... 22 ], 23});
Thanks to everyone who contributed to the Sentry Electron SDK!
No vulnerabilities found.
Reason
30 commit(s) and 26 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 15/19 approved changesets -- score normalized to 7
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
Project has not signed or included provenance with any releases.
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More