sentry_dart_frog

Last updated:

0 purchases

sentry_dart_frog Image
sentry_dart_frog Images
Add to Cart

Description:

sentry dart frog

Sentry for dart_frog #
This is an integration for dart_frog to collects errors and performance traces automatically.
Learn more in this article.

Note
This is experimental. Use at your own risk.

How to use it? #
First add a custom entry point and initialize Sentry as shown in the follwing code snippet. To know more about a custom entry point, read this.
// main.dart
Future<HttpServer> init(Handler handler, InternetAddress ip, int port) async {
await Sentry.init((options) {
options
..dsn = '<your_dsn_here>'
..tracesSampleRate = 1
..addDartFrogInAppExcludes();
});
}

Future<HttpServer> run(Handler handler, InternetAddress ip, int port) {
return serveWithSentry(handler, ip, port);
}
copied to clipboard
Secondly, add the sentryMiddleware as shown in the following code snippet. Read more about middlewares here.
// _middleware.dart
Handler middleware(Handler handler) {
// add Sentry middleware
return handler.use(sentryMiddleware);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.