flex_logger_sentry 1.1.0 copy "flex_logger_sentry: ^1.1.0" to clipboard
flex_logger_sentry: ^1.1.0 copied to clipboard

Sentry integration for FlexLogger - provides error reporting and crash analytics capabilities.

1.1.0 #

  • onEnrichScope hookSentryLoggerProvider and SentryObserver accept an optional SentryScopeEnricher callback invoked inside withScope for both captureException and captureMessage. Applications can set tags, fingerprint, and contexts based on their own error types carried in FlexLog.error. Exceptions thrown by the callback are caught and logged via debugPrint; they never prevent the capture.
  • Separate breadcrumb and event filters – new breadcrumbFilter (default MinLevelFilter(FlexLogLevel.info)) controls which logs become breadcrumbs, independently of the event filter (default MinLevelFilter(FlexLogLevel.error)). Previously a strict event filter (e.g. errors-only in production) also silenced all breadcrumbs, so error events arrived without any trail of prior logs. The observer's outer filter is now the union (CompositeLogFilter.or) of both filters.
  • Log context on exception eventscaptureException events now include message, log_tag, log_level, and timestamp from the originating FlexLog in the logger context (previously the log message only appeared as a breadcrumb).
  • SentryObserver exposes eventFilter and breadcrumbFilter getters; the constructor's filter parameter is kept as a legacy alias for eventFilter.
  • Behavior change: SentryObserver.filter (the outer gate inherited from FlexObserver) is now a CompositeLogFilter union instead of the filter passed to the constructor — use the eventFilter / breadcrumbFilter getters to inspect the configured filters.
  • Behavior change: logs carrying an Exception/Error below the event filter level are now recorded as breadcrumbs (previously they were dropped entirely).
  • Breadcrumb category for custom FlexLog subclasses now falls back to the log's level name instead of logger.
  • Updated sentry_flutter to ^9.24.0.

1.0.4 #

  • Updated dependencies (sentry_flutter: ^9.14.0, flex_logger: ^1.0.4).

1.0.3 #

  • Added optional providerId parameter to SentryLoggerProvider.

1.0.1 #

  • Breaking: SentryObserver default filter changed from MinLevelFilter(FlexLogLevel.warning) to MinLevelFilter(FlexLogLevel.error).
  • SentryObserver callbacks (onLog, onException, onError) updated to Future<void>; all Sentry calls are now properly awaited.
  • onException and onError now use pattern matching instead of force-cast, preventing potential runtime errors if FlexLog.error type is unexpected.
  • Updated docs and examples to use CompositeLogFilter.or([TypeFilter<A>(), TypeFilter<B>()]) in place of the removed MultiTypeFilter.

1.0.0 #

  • Initial release
  • SentryLoggerProvider – implements LoggerProvider; required dsn; SentryFlutter.init in initialize(), Sentry.close() in dispose(); optional filter (default MinLevelFilter(FlexLogLevel.error)), optional optionsConfiguration(SentryFlutterOptions)
  • SentryObserver – FlexObserver; default filter MinLevelFilter(FlexLogLevel.warning) when observer is constructed directly (provider passes its own filter); all received logs added as breadcrumbs; warning/error/critical also sent as events via Sentry.captureMessage; logs with FlexLog.error (Exception/Error) sent via Sentry.captureException in onException/onError
  • FlexLogLevelSentryExtensionFlexLogLevel.toSentryLevel() → SentryLevel (success→info, critical→fatal)
  • Breadcrumb data includes message, level, category, timestamp, logger_type, log_tag, log_level
  • Event context includes log_tag, timestamp, level, logger_type, category
0
likes
150
points
48
downloads

Documentation

API reference

Publisher

verified publisherkrajna.dev

Weekly Downloads

Sentry integration for FlexLogger - provides error reporting and crash analytics capabilities.

Homepage
Repository (GitLab)
View/report issues

Topics

#logging #sentry #error-tracking #crash-reporting

License

MIT (license)

Dependencies

flex_logger, flutter, sentry_flutter

More

Packages that depend on flex_logger_sentry