Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Sep 30, 2025

Adds basic exception recording and updates example app.


Note

Adds Observe.recordException and integrates Flutter/zone error reporting in the example app with a button to trigger an unhandled error.

  • Library (lib/src/observe.dart):
    • Add Observe.recordException to record exceptions (with optional stackTrace and attributes), creating a _launchDarklyErrorSpanName span and ending it.
    • Introduce error span name constant: _launchDarklyErrorSpanName = 'launchdarkly.error'.
  • Example App (example/lib/main.dart):
    • Hook FlutterError.onError to Observe.recordException for framework-handled errors.
    • In runZonedGuarded error handler, call Observe.recordException for uncaught errors.
    • Add ElevatedButton to deliberately throw an exception ("Trigger unhandled error").

Written by Cursor Bugbot for commit cde38af. This will update automatically on new commits. Configure here.

@kinyoklion kinyoklion marked this pull request as ready for review September 30, 2025 20:26
@kinyoklion kinyoklion requested a review from a team as a code owner September 30, 2025 20:26
Base automatically changed from rlamb/add-lifecycle-instrumentation to main October 1, 2025 18:25
@kinyoklion kinyoklion enabled auto-merge (squash) October 1, 2025 18:27
@kinyoklion kinyoklion merged commit 0662783 into main Oct 1, 2025
22 checks passed
@kinyoklion kinyoklion deleted the rlamb/add-record-exception branch October 1, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants