Skip to content

Commit 3706b67

Browse files
authored
Merge branch 'umbrella/melos' into chore/melos/general-cleanup
2 parents 656cce4 + 9da64c1 commit 3706b67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+912
-288
lines changed

.github/workflows/update-deps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Update Dependencies
33
on:
44
# Run every day.
55
schedule:
6-
- cron: '0 3 * * *'
6+
- cron: "0 3 * * *"
77
# And on on every PR merge so we get the updated dependencies ASAP, and to make sure the changelog doesn't conflict.
88
push:
99
branches:

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Features
6+
7+
- Tag all spans with thread info ([#3101](https://github.com/getsentry/sentry-dart/pull/3101))
8+
9+
## 9.6.0
10+
11+
Note: this release might require updating your Android Gradle Plugin version to at least `8.1.4`.
12+
13+
### Fixes
14+
15+
- False replay config restarts because of `ScreenshotWidgetStatus` equality issues ([#3114](https://github.com/getsentry/sentry-dart/pull/3114))
16+
- Debug meta not loaded for split debug info only builds ([#3104](https://github.com/getsentry/sentry-dart/pull/3104))
17+
- TTID/TTFD root transactions ([#3099](https://github.com/getsentry/sentry-dart/pull/3099), [#3111](https://github.com/getsentry/sentry-dart/pull/3111))
18+
- Web, Linux and Windows now create a UI transaction for the root page
19+
- iOS, Android now correctly create idle transactions
20+
- Fixes behaviour of traceId generation and TTFD for app start
21+
- Directionality assertion issue in debug mode ([#3088](https://github.com/getsentry/sentry-dart/pull/3088))
22+
23+
### Dependencies
24+
25+
- Bump JNI from v0.14.1 to v0.14.2 ([#3075](https://github.com/getsentry/sentry-dart/pull/3075))
26+
- Bump Android SDK from v8.13.2 to v8.17.0 ([#2977](https://github.com/getsentry/sentry-dart/pull/2977))
27+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#8170)
28+
- [diff](https://github.com/getsentry/sentry-java/compare/8.13.2...8.17.0)
29+
30+
### Internal
31+
32+
- Use lifecycle hook for before send event ([#3017](https://github.com/getsentry/sentry-dart/pull/3017))
33+
34+
## 9.6.0-beta.2
35+
36+
### Fixes
37+
38+
- False replay config restarts because of `ScreenshotWidgetStatus` equality issues ([#3114](https://github.com/getsentry/sentry-dart/pull/3114))
39+
340
## 9.6.0-beta.1
441

542
### Fixes

packages/dart/lib/src/hub.dart

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -650,22 +650,6 @@ class Hub {
650650

651651
SentryProfilerFactory? _profilerFactory;
652652

653-
@internal
654-
Map<Type, List<Function>> get lifecycleCallbacks =>
655-
_peek().client.lifeCycleRegistry.lifecycleCallbacks;
656-
657-
@internal
658-
void registerSdkLifecycleCallback<T extends SdkLifecycleEvent>(
659-
SdkLifecycleCallback<T> callback) {
660-
_peek().client.lifeCycleRegistry.registerCallback<T>(callback);
661-
}
662-
663-
@internal
664-
void removeSdkLifecycleCallback<T extends SdkLifecycleEvent>(
665-
SdkLifecycleCallback<T> callback) {
666-
_peek().client.lifeCycleRegistry.removeCallback<T>(callback);
667-
}
668-
669653
SentryEvent _assignTraceContext(SentryEvent event) {
670654
// assign trace context
671655
if (event.throwable != null && event.contexts.trace == null) {

packages/dart/lib/src/hub_adapter.dart

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'profiling.dart';
88
import 'protocol.dart';
99
import 'protocol/sentry_feedback.dart';
1010
import 'scope.dart';
11-
import 'sdk_lifecycle_hooks.dart';
1211
import 'sentry.dart';
1312
import 'sentry_client.dart';
1413
import 'sentry_options.dart';
@@ -200,20 +199,4 @@ class HubAdapter implements Hub {
200199

201200
@override
202201
FutureOr<void> captureLog(SentryLog log) => Sentry.currentHub.captureLog(log);
203-
204-
@override
205-
Map<Type, List<Function>> get lifecycleCallbacks =>
206-
Sentry.currentHub.lifecycleCallbacks;
207-
208-
@override
209-
void registerSdkLifecycleCallback<T extends SdkLifecycleEvent>(
210-
SdkLifecycleCallback<T> callback) {
211-
Sentry.currentHub.registerSdkLifecycleCallback(callback);
212-
}
213-
214-
@override
215-
void removeSdkLifecycleCallback<T extends SdkLifecycleEvent>(
216-
SdkLifecycleCallback<T> callback) {
217-
Sentry.currentHub.removeSdkLifecycleCallback(callback);
218-
}
219202
}

packages/dart/lib/src/logs_enricher_integration.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class LogsEnricherIntegration extends Integration<SentryOptions> {
1515
@override
1616
FutureOr<void> call(Hub hub, SentryOptions options) {
1717
if (options.enableLogs) {
18-
hub.registerSdkLifecycleCallback<OnBeforeCaptureLog>(
18+
options.lifecycleRegistry.registerCallback<OnBeforeCaptureLog>(
1919
(event) async {
2020
final os = getSentryOperatingSystem();
2121

packages/dart/lib/src/noop_hub.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import 'profiling.dart';
88
import 'protocol.dart';
99
import 'protocol/sentry_feedback.dart';
1010
import 'scope.dart';
11-
import 'sdk_lifecycle_hooks.dart';
1211
import 'sentry_client.dart';
1312
import 'sentry_options.dart';
1413
import 'tracing.dart';
@@ -145,15 +144,4 @@ class NoOpHub implements Hub {
145144

146145
@override
147146
Scope get scope => Scope(_options);
148-
149-
@override
150-
Map<Type, List<Function>> get lifecycleCallbacks => {};
151-
152-
@override
153-
void registerSdkLifecycleCallback<T extends SdkLifecycleEvent>(
154-
SdkLifecycleCallback<T> callback) {}
155-
156-
@override
157-
void removeSdkLifecycleCallback<T extends SdkLifecycleEvent>(
158-
SdkLifecycleCallback<T> callback) {}
159147
}

packages/dart/lib/src/noop_sentry_client.dart

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ import 'hint.dart';
44
import 'protocol.dart';
55
import 'protocol/sentry_feedback.dart';
66
import 'scope.dart';
7-
import 'sdk_lifecycle_hooks.dart';
87
import 'sentry_client.dart';
98
import 'sentry_envelope.dart';
10-
import 'sentry_options.dart';
119
import 'sentry_trace_context_header.dart';
1210

1311
class NoOpSentryClient implements SentryClient {
@@ -71,9 +69,4 @@ class NoOpSentryClient implements SentryClient {
7169

7270
@override
7371
FutureOr<void> captureLog(SentryLog log, {Scope? scope}) async {}
74-
75-
final _lifeCycleRegistry = SdkLifecycleRegistry(SentryOptions.empty());
76-
77-
@override
78-
SdkLifecycleRegistry get lifeCycleRegistry => _lifeCycleRegistry;
7972
}

packages/dart/lib/src/sdk_lifecycle_hooks.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,11 @@ class OnBeforeSendEvent extends SdkLifecycleEvent {
7171
final SentryEvent event;
7272
final Hint hint;
7373
}
74+
75+
/// Dispatched when a sampled span is started.
76+
@internal
77+
class OnSpanStart extends SdkLifecycleEvent {
78+
OnSpanStart(this.span);
79+
80+
final ISentrySpan span;
81+
}

packages/dart/lib/src/sentry_client.dart

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ class SentryClient {
4646

4747
static final _emptySentryId = Future.value(SentryId.empty());
4848

49-
late final SdkLifecycleRegistry _lifecycleRegistry;
50-
51-
/// Allows registration and dispatching of callbacks outside of SentryClient
52-
@internal
53-
SdkLifecycleRegistry get lifeCycleRegistry => _lifecycleRegistry;
54-
5549
SentryExceptionFactory get _exceptionFactory => _options.exceptionFactory;
5650
SentryStackTraceFactory get _stackTraceFactory => _options.stackTraceFactory;
5751

@@ -89,9 +83,7 @@ class SentryClient {
8983

9084
/// Instantiates a client using [SentryOptions]
9185
SentryClient._(this._options)
92-
: _random = _options.sampleRate == null ? null : Random() {
93-
_lifecycleRegistry = SdkLifecycleRegistry(_options);
94-
}
86+
: _random = _options.sampleRate == null ? null : Random();
9587

9688
/// Reports an [event] to Sentry.io.
9789
Future<SentryId> captureEvent(
@@ -172,7 +164,7 @@ class SentryClient {
172164
}
173165

174166
// Event is fully processed and ready to be sent
175-
await _lifecycleRegistry
167+
await _options.lifecycleRegistry
176168
.dispatchCallback(OnBeforeSendEvent(preparedEvent, hint));
177169

178170
var attachments = List<SentryAttachment>.from(scope?.attachments ?? []);
@@ -579,7 +571,7 @@ class SentryClient {
579571
}
580572

581573
if (processedLog != null) {
582-
await _lifecycleRegistry
574+
await _options.lifecycleRegistry
583575
.dispatchCallback(OnBeforeCaptureLog(processedLog));
584576
_options.logBatcher.addLog(processedLog);
585577
} else {

packages/dart/lib/src/sentry_options.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ class SentryOptions {
412412
@internal
413413
late ClientReportRecorder recorder = NoOpClientReportRecorder();
414414

415+
@internal
416+
late SdkLifecycleRegistry lifecycleRegistry = SdkLifecycleRegistry(this);
417+
415418
/// List of strings/regex controlling to which outgoing requests
416419
/// the SDK will attach tracing headers.
417420
///

0 commit comments

Comments
 (0)