|
| 1 | +import 'package:sentry/src/protocol.dart'; |
| 2 | + |
| 3 | +final event = SentryEvent( |
| 4 | + logger: 'main', |
| 5 | + serverName: 'server.dart', |
| 6 | + release: '1.4.0-preview.1', |
| 7 | + environment: 'Test', |
| 8 | + message: Message('This is an example Dart event.'), |
| 9 | + tags: const <String, String>{'project-id': '7371'}, |
| 10 | + extra: const <String, String>{'section': '1'}, |
| 11 | + fingerprint: const <String>['example-dart'], |
| 12 | + user: const User( |
| 13 | + id: '800', |
| 14 | + username: 'first-user', |
| 15 | + |
| 16 | + ipAddress: '127.0.0.1', |
| 17 | + extras: <String, String>{'first-sign-in': '2020-01-01'}, |
| 18 | + ), |
| 19 | + breadcrumbs: [ |
| 20 | + Breadcrumb( |
| 21 | + message: 'UI Lifecycle', |
| 22 | + timestamp: DateTime.now().toUtc(), |
| 23 | + category: 'ui.lifecycle', |
| 24 | + type: 'navigation', |
| 25 | + data: {'screen': 'MainActivity', 'state': 'created'}, |
| 26 | + level: SentryLevel.info, |
| 27 | + ) |
| 28 | + ], |
| 29 | + contexts: Contexts( |
| 30 | + operatingSystem: const OperatingSystem( |
| 31 | + name: 'Android', |
| 32 | + version: '5.0.2', |
| 33 | + build: 'LRX22G.P900XXS0BPL2', |
| 34 | + kernelVersion: |
| 35 | + 'Linux version 3.4.39-5726670 (dpi@SWHC3807) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Thu Dec 1 19:42:39 KST 2016', |
| 36 | + rooted: false, |
| 37 | + ), |
| 38 | + runtimes: [const Runtime(name: 'ART', version: '5')], |
| 39 | + app: App( |
| 40 | + name: 'Example Dart App', |
| 41 | + version: '1.42.0', |
| 42 | + identifier: 'HGT-App-13', |
| 43 | + build: '93785', |
| 44 | + buildType: 'release', |
| 45 | + deviceAppHash: '5afd3a6', |
| 46 | + startTime: DateTime.now().toUtc(), |
| 47 | + ), |
| 48 | + browser: const Browser(name: 'Firefox', version: '42.0.1'), |
| 49 | + device: Device( |
| 50 | + name: 'SM-P900', |
| 51 | + family: 'SM-P900', |
| 52 | + model: 'SM-P900 (LRX22G)', |
| 53 | + modelId: 'LRX22G', |
| 54 | + arch: 'armeabi-v7a', |
| 55 | + batteryLevel: 99, |
| 56 | + orientation: Orientation.landscape, |
| 57 | + manufacturer: 'samsung', |
| 58 | + brand: 'samsung', |
| 59 | + screenResolution: '2560x1600', |
| 60 | + screenDensity: 2.1, |
| 61 | + screenDpi: 320, |
| 62 | + online: true, |
| 63 | + charging: true, |
| 64 | + lowMemory: true, |
| 65 | + simulator: false, |
| 66 | + memorySize: 1500, |
| 67 | + freeMemory: 200, |
| 68 | + usableMemory: 4294967296, |
| 69 | + storageSize: 4294967296, |
| 70 | + freeStorage: 2147483648, |
| 71 | + externalStorageSize: 8589934592, |
| 72 | + externalFreeStorage: 2863311530, |
| 73 | + bootTime: DateTime.now().toUtc(), |
| 74 | + timezone: 'America/Toronto', |
| 75 | + ), |
| 76 | + ), |
| 77 | +); |
0 commit comments