Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add error monitoring (sentry) #18

Open
matthewwong525 opened this issue Mar 4, 2024 · 2 comments
Open

add error monitoring (sentry) #18

matthewwong525 opened this issue Mar 4, 2024 · 2 comments

Comments

@matthewwong525
Copy link
Collaborator

No description provided.

@RyanParkGH
Copy link

RyanParkGH commented May 16, 2024

Hi Matt,
Love the idea, happy to contribute as well.

For Sentry integration, the basic integration is simply to add the dependency to pubspec.yaml:

dependencies:
...
  sentry_flutter: ^8.2.0

And include the following code in main.dart:

import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Future<void> main() async {
...
  await SentryFlutter.init(
    (options) {
      options.dsn = 'https://[email protected]/add-your-dsn-here';
    },
    // Init your App.
    appRunner: () => runApp(MyApp()),
  );
}

That's all it takes to get basic integration going.

Given the above takes about 2 minutes or less, I'm confused why this isn't part of the existing template. I may be being obtuse, so feel free to correct me! :)

@matthewwong525
Copy link
Collaborator Author

@Autom8r-82 I haven't added it yet because I'd need update flutter, next.js and add documentation. I was also thinking about the best way to incorporate this to make it easy to remove in case someone didn't want to use Sentry.

But, appreciate the code! I'll be sure to get to it soon especially since now it seems like there is some sort of demand for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

2 participants