diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e7edfda..aaa95738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 2.3.0 (2022-10-27) + +- Added `BugsnagTelemetryType.usage` to allow sending of usage telemetry to be disabled. + [#176](https://github.com/bugsnag/bugsnag-flutter/pull/176) +- Update bugsnag-cocoa from v6.21.0 to [v6.25.0](https://github.com/bugsnag/bugsnag-cocoa/blob/master/CHANGELOG.md#6240-2022-10-05) +- Update bugsnag-android from v5.25.0 to [v5.28.1](https://github.com/bugsnag/bugsnag-android/blob/master/CHANGELOG.md#5281-2022-10-19) + ## 2.2.0 (2022-08-03) - Added `telemetry` option to `bugsnag.start` to allow sending of internal errors to be disabled. diff --git a/packages/bugsnag_breadcrumbs_dart_io/pubspec.yaml b/packages/bugsnag_breadcrumbs_dart_io/pubspec.yaml index 4fe660e5..85176ce8 100644 --- a/packages/bugsnag_breadcrumbs_dart_io/pubspec.yaml +++ b/packages/bugsnag_breadcrumbs_dart_io/pubspec.yaml @@ -1,6 +1,6 @@ name: bugsnag_breadcrumbs_dart_io description: Bugsnag network breadcrumbs for dart:io's HttpClient -version: 2.2.0 +version: 2.3.0 homepage: https://www.bugsnag.com/ documentation: https://docs.bugsnag.com/platforms/flutter/ repository: https://github.com/bugsnag/bugsnag-flutter diff --git a/packages/bugsnag_breadcrumbs_http/pubspec.yaml b/packages/bugsnag_breadcrumbs_http/pubspec.yaml index 6a252bc2..724b453e 100644 --- a/packages/bugsnag_breadcrumbs_http/pubspec.yaml +++ b/packages/bugsnag_breadcrumbs_http/pubspec.yaml @@ -1,6 +1,6 @@ name: bugsnag_breadcrumbs_http description: Bugsnag network breadcrumbs for https://pub.dev/packages/http -version: 2.2.0 +version: 2.3.0 homepage: https://www.bugsnag.com/ documentation: https://docs.bugsnag.com/platforms/flutter/ repository: https://github.com/bugsnag/bugsnag-flutter diff --git a/packages/bugsnag_flutter/android/build.gradle b/packages/bugsnag_flutter/android/build.gradle index 8a84f7cc..6447dba5 100644 --- a/packages/bugsnag_flutter/android/build.gradle +++ b/packages/bugsnag_flutter/android/build.gradle @@ -46,7 +46,7 @@ android { } dependencies { - implementation 'com.bugsnag:bugsnag-android:5.25.0' + implementation 'com.bugsnag:bugsnag-android:5.28.1' testImplementation 'junit:junit:4.12' } diff --git a/packages/bugsnag_flutter/android/src/main/java/com/bugsnag/flutter/EnumHelper.java b/packages/bugsnag_flutter/android/src/main/java/com/bugsnag/flutter/EnumHelper.java index e6247e9a..38f82d29 100644 --- a/packages/bugsnag_flutter/android/src/main/java/com/bugsnag/flutter/EnumHelper.java +++ b/packages/bugsnag_flutter/android/src/main/java/com/bugsnag/flutter/EnumHelper.java @@ -31,6 +31,7 @@ class EnumHelper { dartBreadcrumbTypes.put("manual", BreadcrumbType.MANUAL); dartTelemetry.put("internalErrors", Telemetry.INTERNAL_ERRORS); + dartTelemetry.put("usage", Telemetry.USAGE); } private EnumHelper() { diff --git a/packages/bugsnag_flutter/ios/Classes/BugsnagFlutterPlugin.m b/packages/bugsnag_flutter/ios/Classes/BugsnagFlutterPlugin.m index ad5b131f..7b9e6719 100644 --- a/packages/bugsnag_flutter/ios/Classes/BugsnagFlutterPlugin.m +++ b/packages/bugsnag_flutter/ios/Classes/BugsnagFlutterPlugin.m @@ -1,19 +1,7 @@ #import "BugsnagFlutterPlugin.h" -#import "BSG_KSSystemInfo.h" -#import "Bugsnag+Private.h" -#import "BugsnagBreadcrumb+Private.h" -#import "BugsnagBreadcrumbs.h" -#import "BugsnagClient+Private.h" -#import "BugsnagConfiguration+Private.h" -#import "BugsnagError+Private.h" -#import "BugsnagEvent+Private.h" #import "BugsnagFlutterConfiguration.h" -#import "BugsnagHandledState.h" -#import "BugsnagNotifier.h" -#import "BugsnagSessionTracker.h" -#import "BugsnagStackframe+Private.h" -#import "BugsnagThread+Private.h" +#import "BugsnagInternals.h" #import #import @@ -382,7 +370,8 @@ - (void)start:(NSDictionary *)arguments { NSArray *telemetry = arguments[@"telemetry"]; if ([telemetry isKindOfClass:[NSArray class]]) { BSGTelemetryOptions value = - ([telemetry containsObject:@"internalErrors"] ? BSGTelemetryInternalErrors : 0); + ([telemetry containsObject:@"internalErrors"] ? BSGTelemetryInternalErrors : 0) | + ([telemetry containsObject:@"usage"] ? BSGTelemetryUsage : 0) ; configuration.telemetry = value; } @@ -418,7 +407,7 @@ - (NSDictionary *)getLastRunInfo:(NSDictionary *)arguments { } - (NSDictionary *)createEvent:(NSDictionary *)json { - NSDictionary *systemInfo = [BSG_KSSystemInfo systemInfo]; + NSDictionary *systemInfo = BSGGetSystemInfo(); BugsnagClient *client = Bugsnag.client; BugsnagError *error = [BugsnagError errorFromJson:json[@"error"]]; BugsnagEvent *event = [[BugsnagEvent alloc] initWithApp:[client generateAppWithState:systemInfo] @@ -427,10 +416,10 @@ - (NSDictionary *)createEvent:(NSDictionary *)json { [json[@"unhandled"] boolValue] ? UnhandledException : HandledException] user:client.user metadata:[client.metadata copy] - breadcrumbs:client.breadcrumbs.breadcrumbs ?: @[] + breadcrumbs:[client breadcrumbs] errors:@[error] threads:@[] - session:client.sessionTracker.runningSession]; + session:nil /* set by -[BugsnagClient notifyInternal:block:] */]; event.apiKey = client.configuration.apiKey; event.context = client.context; event.projectPackages = self.projectPackages; diff --git a/packages/bugsnag_flutter/ios/bugsnag_flutter.podspec b/packages/bugsnag_flutter/ios/bugsnag_flutter.podspec index 597ee6af..4611c2e1 100644 --- a/packages/bugsnag_flutter/ios/bugsnag_flutter.podspec +++ b/packages/bugsnag_flutter/ios/bugsnag_flutter.podspec @@ -16,5 +16,5 @@ Bugsnag crash monitoring and reporting tool for Flutter apps s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } s.dependency 'Flutter' - s.dependency 'Bugsnag', '6.21.0' + s.dependency 'Bugsnag', '6.25.0' end diff --git a/packages/bugsnag_flutter/lib/src/client.dart b/packages/bugsnag_flutter/lib/src/client.dart index 8c64b2aa..59da8f53 100644 --- a/packages/bugsnag_flutter/lib/src/client.dart +++ b/packages/bugsnag_flutter/lib/src/client.dart @@ -17,7 +17,7 @@ import 'model.dart'; final _notifier = { 'name': 'Flutter Bugsnag Notifier', 'url': 'https://github.com/bugsnag/bugsnag-flutter', - 'version': '2.2.0' + 'version': '2.3.0' }; abstract class BugsnagClient { diff --git a/packages/bugsnag_flutter/lib/src/config.dart b/packages/bugsnag_flutter/lib/src/config.dart index 3940313c..d83c9b07 100644 --- a/packages/bugsnag_flutter/lib/src/config.dart +++ b/packages/bugsnag_flutter/lib/src/config.dart @@ -83,4 +83,7 @@ enum BugsnagEnabledBreadcrumbType { enum BugsnagTelemetryType { /// Errors within the Bugsnag SDK. internalErrors, + + /// Information about how Bugsnag has been configured. + usage, } diff --git a/packages/bugsnag_flutter/pubspec.yaml b/packages/bugsnag_flutter/pubspec.yaml index 0e2f9098..bbf3ad44 100644 --- a/packages/bugsnag_flutter/pubspec.yaml +++ b/packages/bugsnag_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: bugsnag_flutter description: Bugsnag crash monitoring and reporting tool for Flutter apps -version: 2.2.0 +version: 2.3.0 homepage: https://www.bugsnag.com/ documentation: https://docs.bugsnag.com/platforms/flutter/ repository: https://github.com/bugsnag/bugsnag-flutter diff --git a/packages/bugsnag_flutter/test/bugsnag_test.dart b/packages/bugsnag_flutter/test/bugsnag_test.dart index 349bda47..328692c3 100644 --- a/packages/bugsnag_flutter/test/bugsnag_test.dart +++ b/packages/bugsnag_flutter/test/bugsnag_test.dart @@ -77,7 +77,7 @@ void main() { expect( channel['start'][0]['telemetry'], - equals(const ['internalErrors']), + equals(const ['internalErrors', 'usage']), ); });