appdynamics_agent 22.3.0-beta.2 copy "appdynamics_agent: ^22.3.0-beta.2" to clipboard
appdynamics_agent: ^22.3.0-beta.2 copied to clipboard

outdated

Flutter plugin to integrate AppDynamics Mobile Real User Monitoring with your app.

example/example.md

/*

  • Copyright (c) 2022. AppDynamics LLC and its affiliates.
  • All rights reserved.

*/

/// Complete example with all Flutter agent's features.
/// 
import 'dart:async';

import 'package:appdynamics_agent/appdynamics_agent.dart';
import 'package:appdynamics_agent_example/routing/on_generate_route.dart';
import 'package:appdynamics_agent_example/routing/route_paths.dart';
import 'package:flutter/material.dart';

void main() {
  runZonedGuarded(() async {
    WidgetsFlutterBinding.ensureInitialized();
    FlutterError.onError = Instrumentation.errorHandler;

    crashReportCallback(List<CrashReportSummary> summaries) async {
      // ... handle crash reports
    }

    AgentConfiguration config = AgentConfiguration(
        appKey: "<EUM_LICENSE_KEY>",
        loggingLevel: LoggingLevel.verbose,
        collectorURL: "https://www.<collector-url>.com",
        screenshotURL: "https://www.<screenshots-url>.com",
        crashReportCallback: crashReportCallback,
        screenshotsEnabled: true,
        crashReportingEnabled: true
    );
    await Instrumentation.start(config);

    runApp(const MyApp());
  }, (Object error, StackTrace stack) async {
    final details =
        FlutterErrorDetails(exception: error.toString(), stack: stack);
    await Instrumentation.errorHandler(details);
  });
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        initialRoute: RoutePaths.settings,
        onGenerateRoute: onGenerateRoute,
        navigatorObservers: [NavigationObserver()]);
  }
}
16
likes
0
pub points
91%
popularity

Publisher

verified publisherappdynamics.com

Flutter plugin to integrate AppDynamics Mobile Real User Monitoring with your app.

Homepage

License

unknown (LICENSE)

Dependencies

flutter, http, package_info_plus, uuid

More

Packages that depend on appdynamics_agent