Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# package:sentry changelog

## 0.0.6

- use UTC in the `timestamp` field

## 0.0.5

- remove sub-seconds from the timestamp
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ main() async {

[run_zoned]: https://api.dartlang.org/stable/1.24.1/dart-async/runZoned.html
[flutter_error]: https://docs.flutter.io/flutter/foundation/FlutterError/onError.html

## Found a bug?

Please file it at https://github.com/flutter/flutter/issues/new
6 changes: 5 additions & 1 deletion lib/sentry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SentryClient {
UuidGenerator uuidGenerator,
}) {
httpClient ??= new Client();
clock ??= const Clock();
clock ??= const Clock(_getUtcDateTime);
uuidGenerator ??= _generateUuidV4WithoutDashes;
compressPayload ??= true;

Expand Down Expand Up @@ -262,6 +262,10 @@ class SeverityLevel {
final String name;
}

/// Sentry does not take a timezone and instead expects the date-time to be
/// submitted in UTC timezone.
DateTime _getUtcDateTime() => new DateTime.now().toUtc();

/// An event to be reported to Sentry.io.
@immutable
class Event {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
library version;

/// The SDK version reported to Sentry.io in the submitted events.
const String sdkVersion = '0.0.5';
const String sdkVersion = '0.0.6';

/// The SDK name reported to Sentry.io in the submitted events.
const String sdkName = 'dart';
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sentry
version: 0.0.5
version: 0.0.6
description: A pure Dart Sentry.io client.
author: Flutter Authors <[email protected]>
homepage: https://github.com/flutter/sentry
Expand Down