mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 02:05:29 +00:00
Simplify DSN file (#475)
* Add checks for empty sentry DSN * Add default DSN key * Fix CI workflows
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user