Slow and Frozen Frames Instrumentation

Unresponsive UI and animation hitches annoy users and degrade the user experience. Two measurements to track these types of experiences are slow frames and frozen frames. Sentry's slow and frozen frames instrumentation helps track these measurements.

Slow and frozen frames are retrieved directly from the native layer, not the Flutter layer which is a limitation. That means that a slow frame is reported if the native layer is not keeping up with the rendering.

Before starting, ensure:

  1. The Sentry Flutter SDK is initialized. Learn more here.
  2. Performance Monitoring is set up. Learn more here.
  3. Routing Instrumentation is set up. Learn more here.

This type of instrumentation is automatically enabled. There is no need for further configuration.

Set enableAutoPerformanceTracing to false in the options to disable the instrumentation.

Copied
import 'package:flutter/widgets.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

Future<void> main() async {
  await SentryFlutter.init(
    (options) => options.enableAutoPerformanceTracing = false,
    appRunner: () => runApp(MyApp()),
  );
}
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").