Commit 27dc043a authored by Devon Carew's avatar Devon Carew Committed by GitHub

upgrade to the latest usage package (#7917)

parent 06f879b5
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
import 'dart:async'; import 'dart:async';
import 'package:usage/src/usage_impl_io.dart'; // ignore: implementation_imports import 'package:usage/usage_io.dart';
import 'package:usage/usage.dart';
import 'base/context.dart'; import 'base/context.dart';
import 'base/utils.dart'; import 'base/utils.dart';
...@@ -85,18 +84,7 @@ class Usage { ...@@ -85,18 +84,7 @@ class Usage {
void sendException(dynamic exception, StackTrace trace) { void sendException(dynamic exception, StackTrace trace) {
if (!suppressAnalytics) if (!suppressAnalytics)
_analytics.sendException(_shorten('${exception.runtimeType}; ${sanitizeStacktrace(trace)}')); _analytics.sendException('${exception.runtimeType}\n${sanitizeStacktrace(trace)}');
}
/// Shorten the exception information that is sent to Google Analytics
/// to get more information because Google Analytics truncates this to 100 char.
String _shorten(String text) {
/// TODO(danrubel) Gather more information about https://github.com/flutter/flutter/issues/5137
/// remove this code once that issue is resolved.
const String prefix = 'FileSystemException; dart:io/file_impl.dart 807 _RandomAccessFile.writeFromSync dart:io/stdio.dart ';
if (text.startsWith(prefix))
text = 'FSE:807 ' + text.substring(prefix.length);
return text;
} }
/// Fires whenever analytics data is sent over the network; public for testing. /// Fires whenever analytics data is sent over the network; public for testing.
......
...@@ -26,7 +26,7 @@ dependencies: ...@@ -26,7 +26,7 @@ dependencies:
process: 1.0.1 process: 1.0.1
pub_semver: ^1.0.0 pub_semver: ^1.0.0
stack_trace: ^1.4.0 stack_trace: ^1.4.0
usage: ^2.2.1 usage: ^3.0.0
vm_service_client: '0.2.2+4' vm_service_client: '0.2.2+4'
web_socket_channel: ^1.0.4 web_socket_channel: ^1.0.4
xml: ^2.4.1 xml: ^2.4.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment