diff --git a/sqflite/lib/src/sentry_database.dart b/sqflite/lib/src/sentry_database.dart index d7f0d7138c..71147c3464 100644 --- a/sqflite/lib/src/sentry_database.dart +++ b/sqflite/lib/src/sentry_database.dart @@ -44,7 +44,7 @@ class SentryDatabase extends SentryDatabaseExecutor implements Database { static const dbNameKey = 'db.name'; @internal // ignore: public_member_api_docs - String? dbName; + String dbName; /// ```dart /// import 'package:sqflite/sqflite.dart'; @@ -82,7 +82,6 @@ class SentryDatabase extends SentryDatabaseExecutor implements Database { try { await _database.close(); - dbName = null; span?.status = SpanStatus.ok(); } catch (exception) { span?.throwable = exception; diff --git a/sqflite/test/sentry_database_test.dart b/sqflite/test/sentry_database_test.dart index d24dfc31ea..e05bd2367c 100644 --- a/sqflite/test/sentry_database_test.dart +++ b/sqflite/test/sentry_database_test.dart @@ -63,8 +63,6 @@ void main() { await db.close(); - expect(db.dbName, null); - final span = fixture.tracer.children.last; expect(span.context.operation, 'db'); expect(span.context.description, 'Close DB: $inMemoryDatabasePath'); @@ -163,8 +161,6 @@ void main() { expect(db.dbName, inMemoryDatabasePath); await db.close(); - - expect(db.dbName, null); }); tearDown(() {