• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto2";
2
3package cuttlefish;
4
5import "common.proto";
6
7// Wrapper for Cuttlefish Metrics log events.
8// Next index: 22
9message MetricsEvent {
10  // High level event types for this message. This is the broadest
11  // category identifier for MetricsEvent and should be used to indicate
12  // which other fields will be populated. Only used in field event_type.
13  // Next index: 6
14  enum EventType {
15    // An unspecified, unhandled event.
16    CUTTLEFISH_EVENT_TYPE_UNSPECIFIED = 0;
17
18    // The device experienced an error.
19    CUTTLEFISH_EVENT_TYPE_ERROR = 1;
20
21    // The event type is the time the VM instance is instantiated.
22    CUTTLEFISH_EVENT_TYPE_VM_INSTANTIATION = 2;
23
24    // The event type is the time the device boot process is started.
25    CUTTLEFISH_EVENT_TYPE_DEVICE_BOOT = 3;
26
27    // The event type is the time the device lock screen is available.
28    CUTTLEFISH_EVENT_TYPE_LOCK_SCREEN_AVAILABLE = 4;
29
30    // The event type is the time the virtual device was stopped.
31    CUTTLEFISH_EVENT_TYPE_VM_STOP = 5;
32  }
33
34  // Defines the OS that this log was sourced from.
35  // This may not be the same OS which uploaded the log event.
36  // Next index: 5
37  enum OsType {
38    // The log event was sourced from an unspecified os type.
39    CUTTLEFISH_OS_TYPE_UNSPECIFIED = 0;
40
41    // The log event was sourced from Linux x86 os type.
42    CUTTLEFISH_OS_TYPE_LINUX_X86 = 1;
43
44    // The log event was sourced from Linux x86_64 os type.
45    CUTTLEFISH_OS_TYPE_LINUX_X86_64 = 2;
46
47    // The log event was sourced from Linux aarch32 os type.
48    CUTTLEFISH_OS_TYPE_LINUX_AARCH32 = 3;
49
50    // The log event was sourced from Linux aarch64 os type.
51    CUTTLEFISH_OS_TYPE_LINUX_AARCH64 = 4;
52  }
53
54  // Defines the VMM that this log was sourced from.
55  // This may not be the same VMM which uploaded the log event.
56  // Next index: 3
57  enum VmmType {
58    // The log event was sourced from an unspecified vmm type.
59    CUTTLEFISH_VMM_TYPE_UNSPECIFIED = 0;
60
61    // The log event was sourced from a CrOS VM vmm type.
62    CUTTLEFISH_VMM_TYPE_CROSVM = 1;
63
64    // The log event was sourced from a QEMU vmm type.
65    CUTTLEFISH_VMM_TYPE_QEMU = 2;
66  }
67
68  // High level error types for this message. Defines the error
69  // the device received when it experienced an error. This field
70  // should only be present when event_type is ERROR.
71  // Next index: 1
72  enum ErrorType {
73    // An unspecified, unhandled error.
74    CUTTLEFISH_ERROR_TYPE_UNSPECIFIED = 0;
75  }
76
77  // Defines the type of device event contained in this message.
78  // This is the highest level identifier for MetricsEvent messages.
79  optional EventType event_type = 1;
80
81  // Defines the error the device received when it experienced an error.
82  // The field should only be present when event_type is ERROR.
83  optional ErrorType error_type = 2;
84
85  // Time the event occurred in milliseconds since Unix epoch.
86  optional Timestamp event_time_ms = 3;
87
88  // Elapsed time for the event in milliseconds.
89  optional Duration elapsed_time_ms = 4;
90
91  // The type of OS this log event originated from.
92  optional OsType os_type = 5;
93
94  // OS version for the host/guest operating system.
95  // Ex. Android version (9.x, 10.x, etc.) or `uname -r` output
96  optional string os_version = 6;
97
98  // Android guest API level
99  optional int32 api_level = 7;
100
101  // The type of VMM this log event originated from.
102  optional VmmType vmm_type = 8;
103
104  // The version of the VMM that's sending the log event.
105  optional string vmm_version = 9;
106
107  // The company that's sending the log event.
108  optional string company = 10;
109
110  // The allowlist of launch_cvd flags attached to the launch_cvd command
111  // associated with this instance
112  repeated string launch_cvd_flags = 11;
113
114  // Exists a -system_image_dir specified in launch_cvd
115  optional bool exists_system_image_spec = 12;
116
117  // Exists a -boot_image specified in launch_cvd
118  optional bool exists_boot_image_spec = 13;
119
120  // Exists a -bootloader specified in launch_cvd
121  optional bool exists_bootloader_spec = 14;
122
123  // Exists a -composite_disk specified in launch_cvd
124  optional bool exists_composite_disk_spec = 15;
125
126  // Exists a -data_image specified in launch_cvd
127  optional bool exists_data_image_spec = 16;
128
129  // Exists a -metadata_image specified in launch_cvd
130  optional bool exists_metadata_image_spec = 17;
131
132  // Exists a -misc_image specified in launch_cvd
133  optional bool exists_misc_image_spec = 18;
134
135  // Exists a -qemu_binary specified in launch_cvd
136  optional bool exists_qemu_binary_spec = 19;
137
138  // Exists a -super_image specified in launch_cvd
139  optional bool exists_super_image_spec = 20;
140
141  // Exists a -vendor_boot_image specified in launch_cvd
142  optional bool exists_vendor_boot_image_spec = 21;
143}
144