simplytics_sentry 3.0.1 copy "simplytics_sentry: ^3.0.1" to clipboard
simplytics_sentry: ^3.0.1 copied to clipboard

Implementation of Sentry and GlitchTip integration for Simplytics.

Simplytics Sentry/GlitchTip Integration #

Simplytics is a simple abstraction for analytics and crash reporting. This package adds implementation of Sentry and GlitchTip integration.

Usage #

To start using Simplytics with Sentry or GlitchTip, you need to initialize Sentry and configure Simplytics, specify which classes of analytics and error monitoring services to use:

SentryFlutter.init(
  (options) => options
    // Sentry/GlitchTip DSN and other options
    ..dsn = '<dsn url>'
    ..tracesSampleRate = 1.0
    ..enableAutoSessionTracking = false
    // ..release = '0.0.1'
    // ..dist = 'dev'
    ..debug = true
    ..diagnosticLevel = SentryLevel.debug,
    appRunner: () => runAppGuarded(
      () async {
        // Setup Simplytics
        Simplytics.setup(
          crashlogService: SimplyticsCrashlogServiceGroup([
            SimplyticsDebugCrashlogService(),
            SimplyticsSentryCrashlogService(),
          ]),
        );
    
        return const MyApp();
      },
      
      // It is important to enable this setting when using Sentry
      runAppAfterSetup: true,

      onError: (error, stackTrace) {
        Simplytics.crashlog.recordFatalError(error, stackTrace);
      },
    ),
);
0
likes
150
pub points
9%
popularity

Publisher

unverified uploader

Implementation of Sentry and GlitchTip integration for Simplytics.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, sentry_flutter, simplytics

More

Packages that depend on simplytics_sentry