- handlerKey: verify two instances of same class with distinct keys coexist,
same key replaces existing handler, both handlers receive dispatched records
- fault-isolation: verify handles()/handle() throwing does not crash dispatch
and remaining handlers still receive the record
- critical level: verify Level.critical maps to SentryLevel.fatal in both
captureException and captureMessage paths of SentryEventHandler
Add handlerKey to LogHandler so that two instances of the same concrete
class can coexist in AppLoggerRegistry (e.g. two ConsoleLogHandlers with
different formatters, or two Sentry handlers targeting different DSNs).
Default key is runtimeType.toString(), preserving existing dedup behaviour
for handlers that do not override it.
Also add @visibleForTesting on resetForTesting() and convert LogHandler
from abstract interface class to abstract class so the default handlerKey
implementation is inherited without requiring each implementor to redeclare it.
- Wrap both handles() and handle() in a single try/catch so a throwing
handles() cannot abort the pipeline or crash callers
- Replace existing handler by runtimeType instead of silently keeping
the stale instance, so re-registering with a new config takes effect
- Add recursion-safety comment in SentryManager.addBreadcrumb catch
block to lock in the invariant for future handler additions
- Wrap each handler.handle() in try/catch so a failing handler does not
abort the remaining handlers or bubble exceptions to callers
- Fix _FakeSentryReporter.addBreadcrumb signature to match SentryReporter
interface (add level and category named parameters)
- addBreadcrumb gains level (default SentryLevel.debug) and category
params in SentryReporter interface and SentryManager implementation;
SentryBreadcrumbHandler passes level: SentryLevel.debug, category: 'log'
so breadcrumbs on error events are clearly labelled in Sentry UI
- captureMessage param order aligned to {extras, level} in SentryManager
to match the SentryReporter interface declaration
- Test: _FakeSentryReporter updated; new test case asserts level/category
webConsoleEnabled was deprecated in favour of a global constructor flag,
but that removed the ability to force specific log calls visible on web
in release/profile mode — a legitimate need for auth and Sentry init
diagnostics.
Carry webConsoleEnabled through the full pipeline:
LogRecord → buildLogRecord → _dispatch → public log functions.
ConsoleLogHandler reads the flag from the record rather than from its
constructor, so per-call opt-in works independently of build mode.
On web:
- handles() always returns true (filter deferred to handle())
- handle() prints only when record.webConsoleEnabled || isDebugMode
Existing call sites (authorization_interceptors, sentry_config) that
pass webConsoleEnabled: true are preserved and functional again.
- app_logger_registry: add _OtherFakeHandler subclass; fix
'dispatches to multiple handlers' to register two distinct types
and assert both receive the record; use const LogRecord
- sentry_breadcrumb_handler: track capturedExceptions/capturedMessages
in fake; assert both are empty in 'does not call' test
- sentry_event_handler: add SentryLevel to fake captured records;
assert mapped severity in captureException/captureMessage tests
SentryReporter.captureException and captureMessage now accept a
SentryLevel parameter so handlers can forward the mapped severity.
SentryEventHandler maps Level.critical → fatal, Level.error → error.
SentryManager forwards the level via scope.level.
- Add breadcrumb after foreground check so it only fires on background processing
- Fix ADR and CI/Fastfile comments: pubspec is always X.Y.Z, no -rc suffix
Replace last_git_tag with pubspec.yaml as the source for sentry_release
to match the same version string that CI uses when uploading symbols.
This guarantees consistency between what the app reports to Sentry and
what the release.yaml workflow uses for symbol uploads.
Breadcrumbs are only flushed to Sentry when attached to a capture event.
Since every addBreadcrumb call was immediately followed by a return, those
breadcrumbs were never sent. Replace them with capture(message:) so each
early exit is recorded as a Sentry event directly.
- Replace capture(message:) with addBreadcrumb(level: .warning) in NotificationService for non-error diagnostic checkpoints
- Add addBreadcrumb method to SentryManager with category/level support
- Include error details in KeychainController SentryConfig decode failure log
- Split combined guard into two separate guards to distinguish nil state vs unchanged state
- Remove dead do-catch block in onComplete closure; use errors.forEach to capture real errors
- Translate Vietnamese doc comment to English in SentryManager
Use --dart-define=SENTRY_RELEASE=<full-tag> in Fastlane so the app
reports the same version string to Sentry as CI uses when uploading
symbols, bypassing iOS CFBundleShortVersionString stripping.
- Android Fastfile: add --dart-define=SENTRY_RELEASE (build-name unchanged)
- iOS Fastfile: pass DART_DEFINES via xcargs (increment_version_number unchanged)
- Dart: read SENTRY_RELEASE dart-define first, fall back to PackageInfo.version
- NSE/Web unaffected: NSE reads from Keychain, Web falls back to PackageInfo