mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Simplify DSN file (#475)
* Add checks for empty sentry DSN * Add default DSN key * Fix CI workflows
This commit is contained in:
parent
a889c4adbe
commit
b02dc5bac7
8 changed files with 25 additions and 16 deletions
|
|
@ -34,13 +34,15 @@ Future<void> main() async {
|
|||
|
||||
String release = "${pkg}@${version}:${build}";
|
||||
|
||||
await Sentry.init((options) {
|
||||
options.dsn = SENTRY_DSN_KEY;
|
||||
options.release = release;
|
||||
options.environment = isInDebugMode() ? "debug" : "release";
|
||||
options.diagnosticLevel = SentryLevel.debug;
|
||||
options.attachStacktrace = true;
|
||||
});
|
||||
if (SENTRY_DSN_KEY.isNotEmpty) {
|
||||
await Sentry.init((options) {
|
||||
options.dsn = SENTRY_DSN_KEY;
|
||||
options.release = release;
|
||||
options.environment = isInDebugMode() ? "debug" : "release";
|
||||
options.diagnosticLevel = SentryLevel.debug;
|
||||
options.attachStacktrace = true;
|
||||
});
|
||||
}
|
||||
|
||||
// Pass any flutter errors off to the Sentry reporting context!
|
||||
FlutterError.onError = (FlutterErrorDetails details) async {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue