1// Copyright 2017 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 5syntax = "proto2"; 6 7option optimize_for = LITE_RUNTIME; 8option java_package = "org.chromium.components.metrics"; 9 10package ukm; 11 12import "ukm/aggregate.proto"; 13import "ukm/entry.proto"; 14import "ukm/source.proto"; 15import "chrome_user_metrics_extension.proto"; 16import "system_profile.proto"; 17import "user_demographics.proto"; 18 19// This is the message type sent from Chrome to the UKM collector. 20// Next tag: 13 21message Report { 22 // A unique identifier for a Chrome install. This ID should be used only 23 // in UKM reports, and not linked to any other data sources. 24 optional fixed64 client_id = 1; 25 26 // The product corresponding to this log. Note: The default value is Chrome, 27 // so Chrome products will not transmit this field. 28 optional metrics.ChromeUserMetricsExtension.Product product = 12 29 [default = CHROME]; 30 31 // The session id for this record. This id is unique within a 32 // particular Chrome session. The client keeps track of the session id 33 // and sends it with each record. The session id is simply an integer 34 // that is incremented each time the user relaunches Chrome. 35 optional int32 session_id = 5; 36 37 // The report id for this record. Report ids increase sequentially from 38 // one within a session. 39 optional int32 report_id = 6; 40 41 // Indicates that recording was continuously enabled for the period of time 42 // captured in this report. 43 optional bool is_continuous = 8; 44 45 enum LogRotationReason { 46 UNKNOWN = 0; 47 SCHEDULED_ROTATION = 1; 48 BACKGROUNDED = 2; 49 SHUTDOWN = 3; 50 } 51 optional LogRotationReason log_rotation_reason = 9; 52 53 // Information about the user's browser and system configuration. 54 optional metrics.SystemProfileProto system_profile = 2; 55 56 // The user's demographic information that consists of their noised birth year 57 // and gender. This data is made available to Chrome via syncable priority 58 // pref, so is only available if the user is signed-in and syncing. 59 optional metrics.UserDemographicsProto user_demographics = 11; 60 61 // A list of the top-level navigations that data was collected for. 62 repeated Source sources = 3; 63 64 // Counts of different types of sources in this interval, including sources 65 // which may not be in the report due to dropping or deferral. 66 message SourceCounts { 67 // Number of unique sources that URLs were observed for. This counts 68 // includes sources which were dropped or deferred, but not sources 69 // carried over from a previous interval. 70 optional int32 observed = 1; 71 // Number of navigation sources that URLs were observed for, including 72 // sources dropped due to limits. 73 optional int32 navigation_sources = 2; 74 // Number of sources discarded due to not matching a navigation URL. 75 optional int32 unmatched_sources = 3; 76 // Number of sources deferred from a previous interval. 77 optional int32 carryover_sources = 4; 78 // Number of sources deferred to the next interval. Sources corresponding to 79 // opened tabs that could emit more events in the future are kept in memory 80 // and deferred to the next interval for inclusion in next reports, up to a 81 // max limit on number of sources. 82 optional int32 deferred_sources = 5; 83 // Number of sources deferred to the next interval due to lack of events. 84 optional int32 entryless_sources = 6; 85 // Time elapsed in seconds from the moment the newest truncated source was 86 // created to the moment it was discarded from memory, if pruning happened 87 // due to number of sources exceeding the max threshold. 88 optional int32 pruned_sources_age_seconds = 7; 89 } 90 optional SourceCounts source_counts = 10; 91 92 // List of Entries containing the main UKM data. 93 repeated Entry entries = 4; 94 95 // List of Entries containing aggregated UKM data. 96 repeated Aggregate aggregates = 7; 97} 98