Skip to content

Commit

Permalink
Merge branch 'v9' into v9-task/bump-drift-and-use-interceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
buenaflor authored Feb 14, 2025
2 parents 95bbec9 + ea071ab commit 5950868
Show file tree
Hide file tree
Showing 61 changed files with 124 additions and 793 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ jobs:

- run: dart doc --dry-run

- name: Run publish validation
run: |
dart pub get --directory ../scripts/publish_validation
dart run ../scripts/publish_validation/bin/publish_validation.dart --executable ${{ inputs.sdk }}
package-analysis:
# `axel-op/dart-package-analyzer` is using `flutter pub upgrade` instead of `get`,
# which ignores pubspec.yaml `dependency_overrides`. Because of that, all `release/*` branches are failing,
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,17 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # [email protected]
with:
channel: main
- run: flutter upgrade

- run: flutter config --enable-swift-package-manager

- name: Run on iOS
if: matrix.target == 'ios'
run: flutter build ios --no-codesign

- name: Run on macOS
if: matrix.target == 'macos'
run: flutter build macos
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/flutter_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ jobs:
with:
channel: ${{ matrix.sdk }}

- name: flutter upgrade
run: flutter upgrade

- name: flutter pub get
run: flutter pub get

Expand All @@ -204,15 +201,15 @@ jobs:
# Start Xvfb with specific screen settings
Xvfb -ac :99 -screen 0 1280x1024x16 &
export DISPLAY=:99
# Start ChromeDriver
chromedriver --port=4444 &
# Wait for services to start
sleep 5
# Run the tests
flutter drive \
--driver=integration_test/test_driver/driver.dart \
--target=integration_test/web_sdk_test.dart \
-d chrome
-d chrome
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
- Remove deprecated `beforeScreenshot` ([#2662](https://github.com/getsentry/sentry-dart/pull/2662))
- Remove deprecated loggers ([#2685](https://github.com/getsentry/sentry-dart/pull/2685))
- Remove user segment ([#2687](https://github.com/getsentry/sentry-dart/pull/2687))
- Enable JS SDK native integration by default ([#2688](https://github.com/getsentry/sentry-dart/pull/2688))
- Remove `enableTracing` ([#2695](https://github.com/getsentry/sentry-dart/pull/2695))
- Remove `options.autoAppStart` and `setAppStartEnd` ([#2680](https://github.com/getsentry/sentry-dart/pull/2680))
- Bump Drift min version to `2.24.0` and use `QueryInterceptor` instead of `QueryExecutor` ([#2679](https://github.com/getsentry/sentry-dart/pull/2679))
- Add hint for transactions ([#2675](https://github.com/getsentry/sentry-dart/pull/2675))
- `BeforeSendTransactionCallback` now has a `Hint` parameter
- Remove `dart:html` usage in favour of `package:web` ([#2710](https://github.com/getsentry/sentry-dart/pull/2710))

### Enhancements

Expand Down Expand Up @@ -47,9 +50,9 @@

### Dependencies

- Bump Android SDK from v7.20.1 to v7.22.0 ([#2660](https://github.com/getsentry/sentry-dart/pull/2660))
- [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)
- Bump Android SDK from v7.20.1 to v8.2.0 ([#2660](https://github.com/getsentry/sentry-dart/pull/2660), [#2713](https://github.com/getsentry/sentry-dart/pull/2713))
- [changelog](https://github.com/getsentry/sentry-java/blob/7.x.x/CHANGELOG.md#820)
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.1...8.2.0)
- Bump Native SDK from v0.7.19 to v0.7.20 ([#2652](https://github.com/getsentry/sentry-dart/pull/2652))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0720)
- [diff](https://github.com/getsentry/sentry-native/compare/0.7.19...0.7.20)
Expand Down
2 changes: 1 addition & 1 deletion dart/example_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ environment:
dependencies:
sentry:
path: ../../dart/
web: ^0.5.1
web: ^1.1.0

dev_dependencies:
build_runner: ^2.4.2
Expand Down
1 change: 0 additions & 1 deletion dart/lib/src/dart_exception_type_identifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'package:http/http.dart' show ClientException;

import '../sentry.dart';
import 'dart_exception_type_identifier_io.dart'
if (dart.library.html) 'dart_exception_type_identifier_web.dart'
if (dart.library.js_interop) 'dart_exception_type_identifier_web.dart';

class DartExceptionTypeIdentifier implements ExceptionTypeIdentifier {
Expand Down
1 change: 0 additions & 1 deletion dart/lib/src/environment/environment_variables.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import '../platform_checker.dart';
import '_io_environment_variables.dart'
if (dart.library.html) '_web_environment_variables.dart'
if (dart.library.js_interop) '_web_environment_variables.dart' as env;

/// Reads environment variables from the system.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import '../../event_processor.dart';
import '../../sentry_options.dart';
import 'io_enricher_event_processor.dart'
if (dart.library.html) 'html_enricher_event_processor.dart'
if (dart.library.js_interop) 'web_enricher_event_processor.dart';

abstract class EnricherEventProcessor implements EventProcessor {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// We would lose compatibility with old dart versions by adding web to pubspec.
// ignore: depend_on_referenced_packages
import 'package:web/web.dart' as web show window, Window, Navigator;

import '../../../sentry.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import '../../event_processor.dart';
import '../../sentry_options.dart';
import 'io_exception_event_processor.dart'
if (dart.library.html) 'web_exception_event_processor.dart'
if (dart.library.js_interop) 'web_exception_event_processor.dart';

abstract class ExceptionEventProcessor implements EventProcessor {
Expand Down
4 changes: 1 addition & 3 deletions dart/lib/src/origin.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export 'origin_io.dart'
if (dart.library.html) 'origin_html.dart'
if (dart.library.js_interop) 'origin_web.dart';
export 'origin_io.dart' if (dart.library.js_interop) 'origin_web.dart';
5 changes: 0 additions & 5 deletions dart/lib/src/origin_html.dart

This file was deleted.

2 changes: 0 additions & 2 deletions dart/lib/src/origin_web.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// We would lose compatibility with old dart versions by adding web to pubspec.
// ignore: depend_on_referenced_packages
import 'package:web/web.dart';

/// request origin, used for browser stacktrace
Expand Down
53 changes: 0 additions & 53 deletions dart/lib/src/platform/_html_platform.dart

This file was deleted.

2 changes: 0 additions & 2 deletions dart/lib/src/platform/_web_platform.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// We would lose compatibility with old dart versions by adding web to pubspec.
// ignore: depend_on_referenced_packages
import 'package:web/web.dart' as web;

import 'platform.dart';
Expand Down
5 changes: 2 additions & 3 deletions dart/lib/src/platform/platform.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import 'dart:typed_data';

import '_io_platform.dart'
if (dart.library.html) '_html_platform.dart'
if (dart.library.js_interop) '_web_platform.dart' as platform;
import '_io_platform.dart' if (dart.library.js_interop) '_web_platform.dart'
as platform;

const Platform instance = platform.instance;

Expand Down
2 changes: 1 addition & 1 deletion dart/lib/src/sentry_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class SentryClient {
options,
options.transport,
);
// TODO: Web might change soon to use the JS SDK so we can remove it here later on
// TODO: Use spotlight integration directly through JS SDK, then we can remove isWeb check
final enableFlutterSpotlight = (options.spotlight.enabled &&
(options.platformChecker.isWeb ||
options.platformChecker.platform.isLinux ||
Expand Down
12 changes: 0 additions & 12 deletions dart/lib/src/sentry_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,6 @@ class SentryOptions {
_stackTraceExtractorsByType[extractor.exceptionType] = extractor;
}

/// Enables generation of transactions and propagation of trace data. If set
/// to null, tracing might be enabled if [tracesSampleRate] or [tracesSampler]
/// are set.
@Deprecated(
'Use either tracesSampleRate or tracesSampler instead. This will be removed in v9')
bool? enableTracing;

/// Only for internal use. Changed SDK behaviour when set to true:
/// - Rethrow exceptions that occur in user provided closures
@internal
Expand Down Expand Up @@ -557,11 +550,6 @@ class SentryOptions {
/// Returns if tracing should be enabled. If tracing is disabled, starting transactions returns
/// [NoOpSentrySpan].
bool isTracingEnabled() {
// ignore: deprecated_member_use_from_same_package
final enable = enableTracing;
if (enable != null) {
return enable;
}
return tracesSampleRate != null || tracesSampler != null;
}

Expand Down
11 changes: 2 additions & 9 deletions dart/lib/src/sentry_traces_sampler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import '../sentry.dart';

@internal
class SentryTracesSampler {
static const _defaultSampleRate = 1.0;

final SentryOptions _options;
final Random _random;

Expand Down Expand Up @@ -55,13 +53,8 @@ class SentryTracesSampler {
}

double? optionsRate = _options.tracesSampleRate;
double? defaultRate =
// ignore: deprecated_member_use_from_same_package
_options.enableTracing == true ? _defaultSampleRate : null;
double? optionsOrDefaultRate = optionsRate ?? defaultRate;

if (optionsOrDefaultRate != null) {
return _makeSampleDecision(optionsOrDefaultRate);
if (optionsRate != null) {
return _makeSampleDecision(optionsRate);
}

return SentryTracesSamplingDecision(false);
Expand Down
1 change: 0 additions & 1 deletion dart/lib/src/utils/isolate_utils.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:meta/meta.dart';

import '_io_get_isolate_name.dart'
if (dart.library.html) '_web_get_isolate_name.dart'
if (dart.library.js_interop) '_web_get_isolate_name.dart' as isolate_getter;

@internal
Expand Down
Loading

0 comments on commit 5950868

Please sign in to comment.