patapata_sentry 1.0.0 copy "patapata_sentry: ^1.0.0" to clipboard
patapata_sentry: ^1.0.0 copied to clipboard

This package is a plugin for Patapata that adds support for Sentry to your Patapata app.

Patapata - Sentry

Add support for Sentry to your Patapata app.


About #

This package is a plugin for Patapata that adds support for Sentry to your Patapata app.

It will integrate with the Patapata error handling and log systems and automatically report errors to Sentry. It will also integrate with Patapata's User system and automatically send user information to Sentry.

Getting started #

  1. Add the dependency to your pubspec.yaml file
flutter pub add patapata_sentry
  1. Import the package
import 'package:patapata_sentry/patapata_sentry.dart';
  1. Activate the plugin
/// This Environment takes sentry configuration from environment variables.
/// Pass environment variables to your app using the `--dart-define` flag.
class Environment with SentryPluginEnvironment {
  const Environment();

  /// This is the DSN for the Sentry project you want to send errors to.
  @override
  String get sentryDSN => const String.fromEnvironment('SENTRY_DSN');

  /// Just as an example, we're using environment variables to configure
  /// Sentry's environment and dist. You can modify any of the options.
  @override
  FutureOr<void> Function(SentryFlutterOptions)? get sentryOptions =>
      (options) => options
        ..environment = const String.fromEnvironment('SENTRY_ENVIRONMENT')
        ..dist = const String.fromEnvironment('SENTRY_DIST');
}

void main() {
  App(
    environment: const Environment(),
    plugins: [
      SentryPlugin(),
    ],
  )
  .run();
}

Extra configuration #

You can change the traces sample rate and and sample rate via RemoteConfig by setting the following keys:

  • patapata_sentry_plugin_tracessamplerate: (SentryOptions.tracesSampleRate)[https://pub.dev/documentation/sentry_flutter/latest/sentry_flutter/SentryOptions/tracesSampleRate.html]
  • patapata_sentry_plugin_samplerate: (SentryOptions.sampleRate)[https://pub.dev/documentation/sentry_flutter/latest/sentry_flutter/SentryOptions/sampleRate.html]

Contributing #

Check out the CONTRIBUTING guide to get started.

License #

See the LICENSE file

0
likes
0
pub points
21%
popularity

Publisher

verified publishergree.co.jp

This package is a plugin for Patapata that adds support for Sentry to your Patapata app.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, patapata_core, sentry, sentry_flutter

More

Packages that depend on patapata_sentry