mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
fix: Avoid sentry noise by shortening source file path.
This commit is contained in:
parent
c93a168a68
commit
ad199c3faa
11
js/app.js
11
js/app.js
@ -2,6 +2,17 @@ ready(function(){
|
||||
Sentry.init({
|
||||
dsn: 'https://f80fd3ea297141a8bdc04ce812762f39@sentry.io/1513427',
|
||||
release: require('./package.json').version,
|
||||
beforeSend: (event) => {
|
||||
event.exception.values = event.exception.values.map((value) => {
|
||||
value.stacktrace.frames = value.stacktrace.frames.map((frame) => {
|
||||
frame.filename = frame.filename.replace(/^.*ryzen(|-)controller\//g, "");
|
||||
return frame;
|
||||
})
|
||||
return value;
|
||||
});
|
||||
event.request.url = event.request.url.replace(/^.*ryzen(|-)controller\//g, "")
|
||||
return event;
|
||||
}
|
||||
});
|
||||
const settings = require('electron-settings');
|
||||
const fixPath = require('fix-path');
|
||||
|
Loading…
Reference in New Issue
Block a user