Skip to content

Commit

Permalink
check SentryTracer type in ttfd tracker (#2508)
Browse files Browse the repository at this point in the history
* check type

* update changelog
  • Loading branch information
buenaflor authored Dec 17, 2024
1 parent 254c073 commit 38c0369
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Manual TTID ([#2477](https://github.com/getsentry/sentry-dart/pull/2477))

### Improvements

- Check `SentryTracer` type in TTFD tracker ([#2508](https://github.com/getsentry/sentry-dart/pull/2508))

### Enhancements

- Warning (in a debug build) if a potentially sensitive widget is not masked or unmasked explicitly ([#2375](https://github.com/getsentry/sentry-dart/pull/2375))
Expand Down
6 changes: 4 additions & 2 deletions flutter/lib/src/navigation/time_to_full_display_tracker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import 'dart:async';

import 'package:meta/meta.dart';

// ignore: implementation_imports
import 'package:sentry/src/sentry_tracer.dart';

Expand Down Expand Up @@ -42,8 +41,11 @@ class TimeToFullDisplayTracker {
required ISentrySpan transaction,
required DateTime startTimestamp,
}) async {
if (transaction is! SentryTracer) {
return;
}
_startTimestamp = startTimestamp;
_transaction = transaction as SentryTracer;
_transaction = transaction;
_ttfdSpan = transaction.startChild(
SentrySpanOperations.uiTimeToFullDisplay,
description: '${transaction.name} full display',
Expand Down

0 comments on commit 38c0369

Please sign in to comment.