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