Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: pkg/telemetry/README.md

Issue 2954733002: Add initial version of analytics and crash reporting package. (Closed)
Patch Set: updates from review comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/telemetry/LICENSE ('k') | pkg/telemetry/analysis_options.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/telemetry/README.md
diff --git a/pkg/telemetry/README.md b/pkg/telemetry/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..e01b1b6fba050fa88fb613cc1ac352bd5d70f558
--- /dev/null
+++ b/pkg/telemetry/README.md
@@ -0,0 +1,51 @@
+# telemetry
+
+A library to facilitate reporting analytics and crash reports.
+
+## Analytics
+
+This library is designed to allow all Dart SDK tools to easily send analytics
+information and crash reports. The tools share a common setting to configure
+sending analytics data. To use this library for a specific tool:
+
+```
+import 'package:telemtry/telemtry.dart';
+import 'package:usage/usage.dart';
+
+main() async {
+ final String myAppTrackingID = ...;
+ final String myAppName = ...;
+
+ Analytics analytics = createAnalyticsInstance(myAppTrackingID, myAppName);
+ ...
+ analytics.sendScreenView('home');
+ ...
+ await analytics.waitForLastPing();
+}
+```
+
+The analytics object reads from the correct user configuration file
+automatically without any additional configuration. Analytics will not be sent
+if the user has opted-out.
+
+## Crash reporting
+
+To use the crash reporting functionality, import `crash_reporting.dart`, and
+create a new `CrashReportSender` instance:
+
+```dart
+import 'package:telemtry/crash_reporting.dart';
+
+main() {
+ Analytics analytics = ...;
+ CrashReportSender sender = new CrashReportSender(analytics);
+ try {
+ ...
+ } catch (e, st) {
+ sender.sendReport(e, st);
+ }
+}
+```
+
+Crash reports will only be sent if the cooresponding [Analytics] object is
+configured to send analytics.
« no previous file with comments | « pkg/telemetry/LICENSE ('k') | pkg/telemetry/analysis_options.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698