sentry_drift
10.5.0, released 4 days ago by sentry.io
Performance tracing integration for the drift SQL package using Sentry.
What it does
Adds support for performance tracing to the drift package by intercepting database queries and sending them to Sentry. It helps developers monitor SQL query performance and track database operations within transactions.
AI-written summary of version 10.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using the drift package for local database storage and already use Sentry for error tracking or performance monitoring.
- You need to trace and monitor the performance of SQL queries in your application.
Skip it when
- You are not using the drift package.
- You do not use Sentry for monitoring or performance tracing.
Strengths
- Seamlessly integrates drift with Sentry performance tracing.
- Easy to set up with existing Sentry and drift configurations.
Weaknesses
- Strictly tied to the Sentry ecosystem.
- Dependent on both sentry and drift packages functioning correctly together.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Initialize the Sentry SDK with a valid DSN and wrap your drift database executor with SentryQueryInterceptor.
Future<void> main() async {
const dsn = 'YOUR_DSN';
await Sentry.init(
(options) {
options.dsn = dsn;
options.tracesSampleRate = 1.0;
},
);
final executor = NativeDatabase.memory().interceptWith(
SentryQueryInterceptor(databaseName: 'my_db_name'),
);
final db = AppDatabase(executor);
}Alternatives
Packages that do the same job and could replace sentry_drift.
- logging_to_logcat
Forwards dart:developer logging output to Android's logcat.
51Compare - performance
Performance overlay package for Flutter apps that works on web.
50Compare
Works with
Packages commonly used together with sentry_drift: ones it builds on, ones built on it, and its own family.
- sentrysentry_drift depends on itCrash reporting and error tracking library for Dart and Flutter applications.
- driftsentry_drift depends on itDrift is a reactive library to store relational data in Dart and Flutter applications.
- sentry_flutterSame familySentry SDK for Flutter to capture errors, crashes and performance data across platforms.
- sentry_dart_pluginSame familyUploads debug symbols and source maps to Sentry for server-side symbolication.
- sentry_dioSame familyAdds Sentry performance tracing and error capture to Dio HTTP requests.
- sentry_loggingSame familyAdds Sentry logging integration for the Dart logging package
- sentry_linkSame familyAutomatic capture of exceptions and GraphQL errors for the gql ecosystem like graphql and ferry.