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

Side by Side 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, 5 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 unified diff | Download patch
« no previous file with comments | « pkg/telemetry/LICENSE ('k') | pkg/telemetry/analysis_options.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # telemetry
2
3 A library to facilitate reporting analytics and crash reports.
4
5 ## Analytics
6
7 This library is designed to allow all Dart SDK tools to easily send analytics
8 information and crash reports. The tools share a common setting to configure
9 sending analytics data. To use this library for a specific tool:
10
11 ```
12 import 'package:telemtry/telemtry.dart';
13 import 'package:usage/usage.dart';
14
15 main() async {
16 final String myAppTrackingID = ...;
17 final String myAppName = ...;
18
19 Analytics analytics = createAnalyticsInstance(myAppTrackingID, myAppName);
20 ...
21 analytics.sendScreenView('home');
22 ...
23 await analytics.waitForLastPing();
24 }
25 ```
26
27 The analytics object reads from the correct user configuration file
28 automatically without any additional configuration. Analytics will not be sent
29 if the user has opted-out.
30
31 ## Crash reporting
32
33 To use the crash reporting functionality, import `crash_reporting.dart`, and
34 create a new `CrashReportSender` instance:
35
36 ```dart
37 import 'package:telemtry/crash_reporting.dart';
38
39 main() {
40 Analytics analytics = ...;
41 CrashReportSender sender = new CrashReportSender(analytics);
42 try {
43 ...
44 } catch (e, st) {
45 sender.sendReport(e, st);
46 }
47 }
48 ```
49
50 Crash reports will only be sent if the cooresponding [Analytics] object is
51 configured to send analytics.
OLDNEW
« 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