Skip to content

Releases: getsentry/sentry-dart

9.2.0

01 Jul 14:41
d3cc4e0
Compare
Choose a tag to compare

Features

  • Add os and device attributes to Flutter logs (#2978)
  • String templating for structured logs (#3002)
  • Add user attributes to Dart/Flutter logs (#3014)

Fixes

  • Fix context to native sync for sentry context types (#3012)

Enhancements

  • Dont execute app start integration if tracing is disabled (#3026)
  • Set Firebase Remote Config flags on integration initialization (#3008)

9.1.0

24 Jun 11:57
7073074
Compare
Choose a tag to compare

Features

  • Flutter Web: add debug ids to events (#2917)
    • This allows support for symbolication based on debug ids
    • This only works if you use the Sentry Dart Plugin version 3.0.0 or higher
  • Improved TTID/TTFD API (#2866)
    • This improves the stability and consistency of TTFD reporting by introducing new APIs
// Prerequisite: `SentryNavigatorObserver` is set up and routes you navigate to have unique names, e.g configured via `RouteSettings`
// Info: Stateless widgets will report TTFD automatically when wrapped with `SentryDisplayWidget` - no need to call `reportFullyDisplayed`.

// Method 1: wrap your widget that you navigate to in `SentryDisplayWidget` 
SentryDisplayWidget(child: YourWidget())

// Then report TTFD after long running work (File I/O, Network) within your widget.
@override
void initState() {
  super.initState();
  // Do some long running work...
  Future.delayed(const Duration(seconds: 3), () {
    if (mounted) {
      SentryDisplayWidget.of(context).reportFullyDisplayed();
    }
  });
}

// Method 2: use the API directly to report TTFD - this does not require wrapping your widget with `SentryDisplayWidget`:
@override
void initState() {
  super.initState();
  // Get a reference to the current display before doing work.
  final currentDisplay = SentryFlutter.currentDisplay();
  // Do some long running work...
  Future.delayed(const Duration(seconds: 3), () {
    currentDisplay?.reportFullyDisplayed();
  });
}
  • Add message parameter to captureException() (#2882)
  • Add module in SentryStackFrame (#2931)
    • Set SentryOptions.includeModuleInStackTrace = true to enable this. This may change grouping of exceptions.

Dependencies

Enhancements

  • Only enable load debug image integration for obfuscated apps (#2907)

9.0.0

16 Jun 13:16
Compare
Choose a tag to compare

Version 9.0.0 marks a major release of the Sentry Dart/Flutter SDKs containing breaking changes.

The goal of this release is the following:

  • Bump the minimum Dart and Flutter versions to 3.5.0 and 3.24.0 respectively
  • Bump the minimum Android API version to 21
  • Add interoperability with the Sentry Javascript SDK in Flutter Web for features such as release health and reporting native JS errors
  • GA the Session Replay feature
  • Provide feature flag support as well as Firebase Remote Config support
  • Trim down unused and potentially confusing APIs

How To Upgrade

Please carefully read through the migration guide in the Sentry docs on how to upgrade from version 8 to version 9

Breaking changes

  • Increase minimum SDK version requirements to Dart v3.5.0 and Flutter v3.24.0 (#2643)
  • Update naming of LoadImagesListIntegration to LoadNativeDebugImagesIntegration (#2833)
  • Set sentry-native backend to crashpad by default and breakpad for Windows ARM64 (#2791)
    • Setting the SENTRY_NATIVE_BACKEND environment variable will override the defaults.
  • Remove manual TTID implementation (#2668)
  • Remove screenshot option attachScreenshotOnlyWhenResumed (#2664)
  • Remove deprecated beforeScreenshot (#2662)
  • Remove old user feedback api (#2686)
    • This is replaced by beforeCaptureScreenshot
  • Remove deprecated loggers (#2685)
  • Remove user segment (#2687)
  • Enable Sentry JS SDK native integration by default (#2688)
  • Remove enableTracing (#2695)
  • Remove options.autoAppStart and setAppStartEnd (#2680)
  • Bump Drift min version to 2.24.0 and use QueryInterceptor instead of QueryExecutor (#2679)
  • Add hint for transactions (#2675)
    • BeforeSendTransactionCallback now has a Hint parameter
  • Remove dart:html usage in favour of package:web (#2710)
  • Remove max response body size (#2709)
    • Responses are now only attached if size is below ~0.15mb
    • Responses are attached to the Hint object, which can be read in beforeSend/beforeSendTransaction callbacks via hint.response.
    • For now, only the dio integration is supported.
  • Enable privacy masking for screenshots by default (#2728)
  • Set option anrEnabled to true by default (#2878)
  • Mutable Data Classes (#2818)
    • Some SDK classes do not have const constructors anymore.
    • The copyWith and clone methods of SDK classes were deprecated.
// old
options.beforeSend = (event, hint) {
  event = event.copyWith(release: 'my-release');
  return event;
}
// new
options.beforeSend = (event, hint) {
  event.release = 'my-release';
  return event;
}

Features

  • Sentry Structured Logs Beta (#2919)
    • The old SentryLogger has been renamed to SdkLogCallback and can be accessed through options.log now.
    • Adds support for structured logging though Sentry.logger:
// Enable in `SentryOptions`:
options.enableLogs = true;

// Use `Sentry.logger`
Sentry.logger.info("This is a info log.");
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
  'string-attribute': SentryLogAttribute.string('string'),
  'int-attribute': SentryLogAttribute.int(1),
  'double-attribute': SentryLogAttribute.double(1.0),
  'bool-attribute': SentryLogAttribute.bool(true),
});
  • Add support for feature flags and integration with Firebase Remote Config (#2825, #2837)
// Manually track a feature flag
Sentry.addFeatureFlag('my-feature', true);

// or use the Sentry Firebase Remote Config Integration (sentry_firebase_remote_config package is required)
// Add the integration to automatically track feature flags from firebase remote config.
await SentryFlutter.init(
  (options) {
    options.dsn = 'https://example@sentry.io/add-your-dsn-here';
    options.addIntegration(
      SentryFirebaseRemoteConfigIntegration(
        firebaseRemoteConfig: yourFirebaseRemoteConfig,
      ),
    );
  },
);
  • Properly generates and links trace IDs for errors and spans (#2869, #2861):
    • With SentryNavigatorObserver - each navigation event starts a new trace.
    • Without SentryNavigatorObserver on non-web platforms - a new trace is started from app
      lifecycle hooks.
    • Web without SentryNavigatorObserver - the same trace ID is reused until the page is
      refreshed or closed.
  • Add support for Flutter Web release health (#2794)
    • Requires using SentryNavigatorObserver;

Behavioral changes

  • Set log level to warning by default when debug = true (#2836)
  • Set HTTP client breadcrumbs log level based on response status code (#2847)
    • 5xx is mapped to SentryLevel.error
    • 4xx is mapped to SentryLevel.warning
  • Parent-child relationship for the PlatformExceptions and Cause (#2803)
    • Improves and more accurately represent exception groups
    • Disabled by default as it may cause issues to group differently
    • You can enable this feature by setting options.groupException = true

Improvements

  • Replay: improve Android native interop performance by using JNI (#2670)
  • Align User Feedback API (#2949)
    • Don’t apply breadcrumbs and extras from scope to feedback events
    • Capture session replay when processing feedback events
    • Record feedback client report for dropped feedback events
    • Record feedback client report for errors when using HttpTransport
  • Truncate feedback message to max 4096 characters (#2954)
  • Replay: Mask RichText Widgets by default (#2975)

Dependencies

9.0.0-RC.4

11 Jun 11:50
Compare
Choose a tag to compare
9.0.0-RC.4 Pre-release
Pre-release

Enhancements

  • Replay: Mask RichText Widgets (#2975)

9.0.0-RC.3

20 May 15:47
Compare
Choose a tag to compare
9.0.0-RC.3 Pre-release
Pre-release

Features

  • Sentry Structured Logs (#2919)
// Enable in `SentryOptions`:
options.enableLogs = true;

// Use `Sentry.logger`
Sentry.logger.info("This is a info log.");
Sentry.logger.warn("This is a warning log with attributes.", attributes: {
  'attribute1': SentryLogAttribute.string('string'),
  'attribute2': SentryLogAttribute.int(1),
  'attribute3': SentryLogAttribute.double(1.0),
  'attribute4': SentryLogAttribute.bool(true),
});

Enhancements

  • Align User Feedback API (#2949)
    • Don’t apply breadcrumbs and extras from scope to feedback events
    • Capture session replay when processing feedback events
    • Record feedback client report for dropped feedback events
    • Record feedback client report for errors when using HttpTransport
  • Truncate feedback message to max 4096 characters (#2954)

Dependencies

9.0.0-RC.2

15 May 10:34
Compare
Choose a tag to compare
9.0.0-RC.2 Pre-release
Pre-release

Fixes

  • Add hasSize guard when using a renderObject in SentryUserInteractionWidget (#2946)

9.0.0-RC.1

14 May 14:10
Compare
Choose a tag to compare
9.0.0-RC.1 Pre-release
Pre-release

Fixes

  • Fix feature flag model keys (#2943)

9.0.0-RC

08 May 14:17
Compare
Choose a tag to compare
9.0.0-RC Pre-release
Pre-release

9.0.0 is now a release candidate.

9.0.0-beta.2

05 May 11:59
Compare
Choose a tag to compare
9.0.0-beta.2 Pre-release
Pre-release

Fixes

  • Errors caught by OnErrorIntegration should be unhandled by default (#2901)
    • This will not affect grouping
    • This might affect crash-free rate

Dependencies

9.0.0-beta.1

24 Apr 12:45
Compare
Choose a tag to compare
9.0.0-beta.1 Pre-release
Pre-release

Features

  • Properly generates and links trace IDs for errors and spans (#2869, #2861):
    • With SentryNavigatorObserver - each navigation event starts a new trace.
    • Without SentryNavigatorObserver on non-web platforms - a new trace is started from app
      lifecycle hooks.
    • Web without SentryNavigatorObserver - the same trace ID is reused until the page is
      refreshed or closed.
  • Add FeatureFlagIntegration (#2825)
// Manually track a feature flag
Sentry.addFeatureFlag('my-feature', true);
  • Firebase Remote Config Integration (#2837)
// Add the integration to automatically track feature flags from firebase remote config.
await SentryFlutter.init(
  (options) {
    options.dsn = 'https://example@sentry.io/add-your-dsn-here';
    options.addIntegration(
      SentryFirebaseRemoteConfigIntegration(
        firebaseRemoteConfig: yourFirebaseRemoteConfig,
      ),
    );
  },
);

Fixes

  • Trace propagation in HTTP tracing clients not correctly set up if performance is disabled (#2850)

Behavioral changes

  • Mutable Data Classes (#2818)
    • Some SDK classes do not have const constructors anymore.
    • The copyWith and clone methods of SDK classes were deprecated.
  • Set log level to warning by default when debug = true (#2836)
  • Set HTTP client breadcrumbs log level based on response status code (#2847)
    • 5xx is mapped to SentryLevel.error
    • 4xx is mapped to SentryLevel.warning
  • Parent-child relationship for the PlatformExceptions and Cause (#2803, #2858)
    • Improves and changes exception grouping. To opt in, set groupExceptions=true
  • Set anrEnabled enabled per default (#2878)

API Changes

  • Update naming of LoadImagesListIntegration to LoadNativeDebugImagesIntegration (#2833)
  • Remove other from SentryRequest (#2879)

Dependencies