Skip to content

Commit

Permalink
Merge branch 'v9' into refactor/cleanup-platform-mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind authored Feb 24, 2025
2 parents 8411978 + bb29ef9 commit 71a58da
Show file tree
Hide file tree
Showing 29 changed files with 1,667 additions and 1,427 deletions.
26 changes: 23 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased 9.0.0
## 9.0.0-alpha.1

### Breaking changes

Expand Down Expand Up @@ -34,12 +34,14 @@
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#810)
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.1.0)

## Unreleased
## 8.14.0-beta.1

### Behavioral changes

- ⚠️ Auto IP assignment for `SentryUser` is now guarded by `sendDefaultPii` ([#2726](https://github.com/getsentry/sentry-dart/pull/2726))
- If you rely on Sentry automatically processing the IP address of the user, set `options.sendDefaultPii = true` or manually set the IP address of the `SentryUser` to `{{auto}}`
- Adding the device name to Contexts is now guarded by `sendDefaultPii` ([#2741](https://github.com/getsentry/sentry-dart/pull/2741))
- Set `options.sendDefaultPii = true` if you want to have the device name reported

### Features

Expand All @@ -54,7 +56,6 @@
### Fixes

- Reference to `SentryWidgetsFlutterBinding` in warning message in `FramesTrackingIntegration` ([#2704](https://github.com/getsentry/sentry-dart/pull/2704))
- Replay video interruption if a `navigation` breadcrumb is missing `to` route info ([#2720](https://github.com/getsentry/sentry-dart/pull/2720))

### Deprecations

Expand Down Expand Up @@ -88,6 +89,25 @@ final db = AppDatabase(executor);
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8450)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.44.0...8.45.0)

## 8.13.2

### Fixes

- `build_web_compiler` error ([#2736](https://github.com/getsentry/sentry-dart/pull/2736))
- Use `if (dart.library.html)` instead of `if (dart.html)` for imports

## 8.13.1

### Fixes

- Replay video interruption if a `navigation` breadcrumb is missing `to` route info ([#2720](https://github.com/getsentry/sentry-dart/pull/2720))

### Dependencies

- Bump Android SDK from v7.20.1 to v7.22.0 ([#2705](https://github.com/getsentry/sentry-dart/pull/2705))
- [changelog](https://github.com/getsentry/sentry-java/blob/7.x.x/CHANGELOG.md#7220)
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...7.22.0)

## 8.13.0

### Breaking changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ class IoEnricherEventProcessor implements EnricherEventProcessor {
SentryDevice _getDevice(SentryDevice? device) {
final platformMemory = PlatformMemory(_options);
return (device ?? SentryDevice()).copyWith(
name: device?.name ?? Platform.localHostname,
name: device?.name ??
(_options.sendDefaultPii ? Platform.localHostname : null),
processorCount: device?.processorCount ?? Platform.numberOfProcessors,
memorySize: device?.memorySize ?? platformMemory.getTotalPhysicalMemory(),
freeMemory: device?.freeMemory ?? platformMemory.getFreePhysicalMemory(),
Expand Down
2 changes: 1 addition & 1 deletion dart/lib/src/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
library;

/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '8.13.0';
const String sdkVersion = '9.0.0-alpha.1';

String sdkName(bool isWeb) => isWeb ? _browserSdkName : _ioSdkName;

Expand Down
2 changes: 1 addition & 1 deletion dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sentry
version: 8.13.0
version: 9.0.0-alpha.1
description: >
A crash reporting library for Dart that sends crash reports to Sentry.io.
This library supports Dart VM and Web. For Flutter consider sentry_flutter instead.
Expand Down
9 changes: 8 additions & 1 deletion dart/test/event_processor/enricher/io_enricher_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,17 @@ void main() {
}
});

test('device has name', () {
test('device has no name if sendDefaultPii = false', () {
final enricher = fixture.getSut();
final event = enricher.apply(SentryEvent(), Hint());

expect(event?.contexts.device?.name, isNull);
});

test('device has name if sendDefaultPii = true', () {
final enricher = fixture.getSut(includePii: true);
final event = enricher.apply(SentryEvent(), Hint());

expect(event?.contexts.device?.name, isNotNull);
});

Expand Down
2 changes: 1 addition & 1 deletion dio/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '8.13.0';
const String sdkVersion = '9.0.0-alpha.1';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_dio';
4 changes: 2 additions & 2 deletions dio/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_dio
description: An integration which adds support for performance tracing for the Dio package.
version: 8.13.0
version: 9.0.0-alpha.1
homepage: https://docs.sentry.io/platforms/dart/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -19,7 +19,7 @@ platforms:

dependencies:
dio: ^5.0.0
sentry: 8.13.0
sentry: 9.0.0-alpha.1

dev_dependencies:
meta: ^1.3.0
Expand Down
2 changes: 1 addition & 1 deletion drift/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '8.13.0';
const String sdkVersion = '9.0.0-alpha.1';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_drift';
4 changes: 2 additions & 2 deletions drift/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_drift
description: An integration which adds support for performance tracing for the drift package.
version: 8.13.0
version: 9.0.0-alpha.1
homepage: https://docs.sentry.io/platforms/flutter/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -17,7 +17,7 @@ platforms:
web:

dependencies:
sentry: 8.13.0
sentry: 9.0.0-alpha.1
meta: ^1.3.0
drift: ^2.24.0

Expand Down
2 changes: 1 addition & 1 deletion file/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '8.13.0';
const String sdkVersion = '9.0.0-alpha.1';

/// The package name reported to Sentry.io in the submitted events.
const String packageName = 'pub:sentry_file';
4 changes: 2 additions & 2 deletions file/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_file
description: An integration which adds support for performance tracing for dart.io.File.
version: 8.13.0
version: 9.0.0-alpha.1
homepage: https://docs.sentry.io/platforms/dart/
repository: https://github.com/getsentry/sentry-dart
issue_tracker: https://github.com/getsentry/sentry-dart/issues
Expand All @@ -17,7 +17,7 @@ platforms:
windows:

dependencies:
sentry: 8.13.0
sentry: 9.0.0-alpha.1
meta: ^1.3.0

dev_dependencies:
Expand Down
4 changes: 2 additions & 2 deletions flutter/example/integration_test/web_sdk_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ void main() {
expect((header['sdk'] as Map<Object?, Object?>)['name'],
'sentry.dart.flutter');

final item = (envelope[1] as List<Object?>).first as List<Object?>;
final item = (envelope[1] as List).first as List<Object?>;
final itemPayload =
json.decode(utf8.decoder.convert((item[1] as List<int>)))
json.decode(utf8.decoder.convert(item[1] as List<int>))
as Map<Object?, Object?>;

final jsEventJson = (itemPayload).map((key, value) {
Expand Down
2 changes: 1 addition & 1 deletion flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sentry_flutter_example
description: Demonstrates how to use the sentry_flutter plugin.
version: 8.13.0
version: 9.0.0-alpha.1

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/src/version.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '8.13.0';
const String sdkVersion = '9.0.0-alpha.1';

/// The default SDK name reported to Sentry.io in the submitted events.
const String sdkName = 'sentry.dart.flutter';
1 change: 0 additions & 1 deletion flutter/lib/src/web/sentry_js_binding.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/cupertino.dart';

export 'noop_sentry_js_binding.dart'
if (dart.html) 'html_sentry_js_binding.dart'
if (dart.library.js_interop) 'web_sentry_js_binding.dart';

abstract class SentryJsBinding {
Expand Down
4 changes: 2 additions & 2 deletions flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sentry_flutter
version: 8.13.0
version: 9.0.0-alpha.1
description: Sentry SDK for Flutter. This package aims to support different Flutter targets by relying on the many platforms supported by Sentry with native SDKs.
homepage: https://docs.sentry.io/platforms/flutter/
repository: https://github.com/getsentry/sentry-dart
Expand All @@ -23,7 +23,7 @@ dependencies:
sdk: flutter
flutter_web_plugins:
sdk: flutter
sentry: 8.13.0
sentry: 9.0.0-alpha.1
package_info_plus: '>=1.0.0'
meta: ^1.3.0
ffi: ^2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void main() {
const expectedId = '1';
String? actualId;

fixture.options.beforeSendTransaction = (transaction) {
fixture.options.beforeSendTransaction = (transaction, hint) {
actualIp = transaction.user?.ipAddress;
actualId = transaction.user?.id;
return transaction;
Expand Down
Loading

0 comments on commit 71a58da

Please sign in to comment.