Giter Club home page Giter Club logo

Comments (6)

fuzzybinary avatar fuzzybinary commented on June 29, 2024

Hi @samuelcecilio thanks for reaching out!

It sounds like you already set the DatadogSdk.sdkVerbosity to Verbosity.verbose, but if not can you do that and post what console messages you're seeing? Additionally, are you seeing any messages every so often saying whether or not Datadog has any information to send?

Lastly, have you started a view using DatadogSdk.instance.rum?.startView(), or by using named routes in conjunction with the DatadogNavigationObserver?

from dd-sdk-flutter.

samuelcecilio avatar samuelcecilio commented on June 29, 2024

Hi, thanks. The main.dart looks like:

Future<void> main() async {
  runZonedGuarded<Future<void>>(
    () async {
      WidgetsFlutterBinding.ensureInitialized();

      // called inside a function (await di.init())
      await DatadogSdk.instance.initialize(
        DdSdkConfiguration(
          clientToken: remoteConfig.getString(CommonConsts.REMOTE_CONFIG_DATADOG_CLIENT_TOKEN),
          env: const String.fromEnvironment(Environment.buildEnv),
          site: DatadogSite.us1,
          trackingConsent: TrackingConsent.granted,
          nativeCrashReportEnabled: true,
          loggingConfiguration: LoggingConfiguration(
            sendNetworkInfo: true,
            printLogsToConsole: true,
          ),
          rumConfiguration: RumConfiguration(
            applicationId: remoteConfig.getString(CommonConsts.REMOTE_CONFIG_DATADOG_APP_ID),
            detectLongTasks: true,
          ),
        ),
      );

      FlutterError.onError = (FlutterErrorDetails details) {
        FlutterError.presentError(details);
        FirebaseCrashlytics.instance.recordFlutterError(details);
        DatadogSdk.instance.rum?.handleFlutterError(details);
      };

      runApp(
        BlocProvider.value(
          value: di.sl<AuthBloc>(),
          child: MyApp(),
        ),
      );
    },
    (error, stack) {
      FirebaseCrashlytics.instance.recordError(error, stack);
      DatadogSdk.instance.rum?.addErrorInfo(error.toString(), RumErrorSource.source, stackTrace: stack);
    },
  );
}

Verbosity.verbose is the default, or do I need to set it manually?

With only this setting, I automatically get memory usage statistics and error reports for iOS, for Android I don't get any.

Captura de Tela 2022-10-11 às 15 10 06

from dd-sdk-flutter.

fuzzybinary avatar fuzzybinary commented on June 29, 2024

You need to set it manually. Before calling DatadogSdk.instance.initialize, add:

DatadogSdk.sdkVerbosity = Verbosity.verbose;

The Datadog SDK is actually very verbose about what it's doing on this setting, so it is set to a lower level by default.

Are you calling DatadogSdk.instance.rum?.startView or are you using the DatadogNavigationObserver? And are you seeing views for individual sessions?

from dd-sdk-flutter.

samuelcecilio avatar samuelcecilio commented on June 29, 2024

I had not implemented the DatadogNavigationObserver, apparently for iOS this was not a problem as everything was like ApplicationLaunch:
Captura de Tela 2022-10-18 às 08 11 02

BTW, verbosity looks differently for android and ios:
Captura de Tela 2022-10-18 às 08 01 29
android

Captura de Tela 2022-10-18 às 08 08 57

iOS

from dd-sdk-flutter.

fuzzybinary avatar fuzzybinary commented on June 29, 2024

Yes, under the hood, the Flutter SDK uses the native iOS / Android SDKs which are slightly different in what they output, and there are a few slight differences in how they report certain situations (like no initial view, as you found). Sometimes this is just based on some limitations of the platform and sometimes it's just difference in implementation. We're looking to correct as many of these as we can moving forward.

Does this resolve your issue do you need more help?

from dd-sdk-flutter.

samuelcecilio avatar samuelcecilio commented on June 29, 2024

Yep, solved!

from dd-sdk-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.