sentry-dart icon indicating copy to clipboard operation
sentry-dart copied to clipboard

Debouncing of SentryWidgetsBindingObserver.didChangeMetrics.

Open ueman opened this issue 4 years ago • 6 comments
trafficstars

Platform:

  • [ ] Dart
  • [x] Flutter Android or iOS
  • [ ] Flutter Web

IDE:

  • [ ] VSCode
  • [ ] IntelliJ/AS
  • [ ] XCode
  • [ ] Other, which one?

The version of the SDK (See pubspec.lock): 5.0.0


SentryWidgetsBindingObserver.didChangeMetrics gets called way too often. As seen in this crash report it gets called way too much.

ueman avatar Apr 06 '21 06:04 ueman

@ueman the linked issue does not have any breadcrumb with device.screen category, could you double-check, please?

marandaneto avatar Apr 06 '21 07:04 marandaneto

I'd chose between bug or enhancement btw, it can't be both though, sounds like it does its job so maybe debouncing would be an enhancement to not make it too noisy

marandaneto avatar Apr 06 '21 07:04 marandaneto

It is an older event of the same exception https://sentry.io/organizations/sentry-sdks/issues/2149575550/events/0fb9c693eea84858b8b0a6986a7e16e6/?project=5428562

ueman avatar Apr 06 '21 07:04 ueman

indeed, thanks, let's debouce it and take the last then, what would be a reasonable timeout for deboucing? 1-3s?

marandaneto avatar Apr 06 '21 07:04 marandaneto

Yeah, that time span seems reasonable

ueman avatar Apr 06 '21 07:04 ueman

On Linux this also seems to be a problem even without resizing the window: https://sentry.io/share/issue/014e554f41e449298005bc120e1641da/

ueman avatar May 07 '21 06:05 ueman