mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-20 05:49:12 +00:00
Exclude some sentry logs
This commit is contained in:
parent
7bb7ad40c4
commit
b65dc35cb7
1 changed files with 14 additions and 0 deletions
|
@ -169,6 +169,20 @@ void main() async {
|
|||
(options) {
|
||||
options.dsn = dotenv.env['SENTRY_DSN'];
|
||||
options.sendDefaultPii = false;
|
||||
options.beforeSend = (event, hint) {
|
||||
if (event.throwable is HttpException) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (
|
||||
event.message?.formatted.contains("Unexpected character") ?? false ||
|
||||
(event.throwable != null && event.throwable!.toString().contains("Unexpected character"))
|
||||
) {
|
||||
return null; // Exclude this event
|
||||
}
|
||||
|
||||
return event;
|
||||
};
|
||||
},
|
||||
appRunner: () => startApp()
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue