1// Copyright 2021 The Chromium Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5module metrics.structured.mojom; 6 7import "mojo/public/mojom/base/time.mojom"; 8 9/* 10 * Events to be recorded by StructuredMetrics. All values will be unhashed to be 11 * validated once received by the service. 12 * 13 * Next version: 2 14 */ 15[Stable] 16struct Event { 17 string project_name@0; 18 19 string event_name@1; 20 21 // Map containing metric name to its value. These should be consistent with 22 // definitions in structured.xml. 23 map<string, MetricValue> metrics@2; 24 25 // Time passed (in microseconds) since boot time. 26 [MinVersion=1] mojo_base.mojom.TimeDelta? system_uptime@3; 27 28 // Whether this event is part of a sequence. 29 [MinVersion=1] bool is_event_sequence@4; 30}; 31 32[Stable] 33union MetricValue { 34 string hmac_value; 35 int64 long_value; 36 int32 int_value; 37 double double_value; 38 string raw_str_value; 39 bool bool_value; 40}; 41