Skip to content

Commit

Permalink
Merge pull request #178 from bugsnag/releases/v2.3.0
Browse files Browse the repository at this point in the history
Version 2.3.0
  • Loading branch information
nickdowell authored Oct 27, 2022
2 parents 4e7e7c9 + 1cda0c8 commit ab1b9cc
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/bugsnag_breadcrumbs_dart_io/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/bugsnag_breadcrumbs_http/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/bugsnag_flutter/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class EnumHelper {
dartBreadcrumbTypes.put("manual", BreadcrumbType.MANUAL);

dartTelemetry.put("internalErrors", Telemetry.INTERNAL_ERRORS);
dartTelemetry.put("usage", Telemetry.USAGE);
}

private EnumHelper() {
Expand Down
23 changes: 6 additions & 17 deletions packages/bugsnag_flutter/ios/Classes/BugsnagFlutterPlugin.m
Original file line number Diff line number Diff line change
@@ -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 <dlfcn.h>
#import <mach-o/dyld.h>
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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]
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/bugsnag_flutter/ios/bugsnag_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/bugsnag_flutter/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions packages/bugsnag_flutter/lib/src/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@ enum BugsnagEnabledBreadcrumbType {
enum BugsnagTelemetryType {
/// Errors within the Bugsnag SDK.
internalErrors,

/// Information about how Bugsnag has been configured.
usage,
}
2 changes: 1 addition & 1 deletion packages/bugsnag_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/bugsnag_flutter/test/bugsnag_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void main() {

expect(
channel['start'][0]['telemetry'],
equals(const ['internalErrors']),
equals(const ['internalErrors', 'usage']),
);
});

Expand Down

0 comments on commit ab1b9cc

Please sign in to comment.