// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.metrics";
package ukm;
import "ukm/aggregate.proto";
import "ukm/entry.proto";
import "ukm/source.proto";
import "ukm/web_features.proto";
import "chrome_user_metrics_extension.proto";
import "system_profile.proto";
import "user_demographics.proto";
// This is the message type sent from Chrome to the UKM collector.
// Next tag: 14
message Report {
// A unique identifier for a Chrome install. This ID should be used only
// in UKM reports, and not linked to any other data sources.
optional fixed64 client_id = 1;
// The product corresponding to this log. Note: The default value is Chrome,
// so Chrome products will not transmit this field.
optional metrics.ChromeUserMetricsExtension.Product product = 12
[default = CHROME];
// The session id for this record. This id is unique within a
// particular Chrome session. The client keeps track of the session id
// and sends it with each record. The session id is simply an integer
// that is incremented each time the user relaunches Chrome.
optional int32 session_id = 5;
// The report id for this record. Report ids increase sequentially from
// one within a session.
optional int32 report_id = 6;
// Indicates that recording was continuously enabled for the period of time
// captured in this report.
optional bool is_continuous = 8;
enum LogRotationReason {
UNKNOWN = 0;
SCHEDULED_ROTATION = 1;
BACKGROUNDED = 2;
SHUTDOWN = 3;
}
optional LogRotationReason log_rotation_reason = 9;
// Information about the user's browser and system configuration.
optional metrics.SystemProfileProto system_profile = 2;
// The user's demographic information that consists of their noised birth year
// and gender. This data is made available to Chrome via syncable priority
// pref, so is only available if the user is signed-in and syncing.
optional metrics.UserDemographicsProto user_demographics = 11;
// A list of the top-level navigations that data was collected for.
repeated Source sources = 3;
// Counts of different types of sources in this interval, including sources
// which may not be in the report due to dropping or deferral.
message SourceCounts {
// Number of unique sources that URLs were observed for. This counts
// includes sources which were dropped or deferred, but not sources
// carried over from a previous interval.
optional int32 observed = 1;
// Number of navigation sources that URLs were observed for, including
// sources dropped due to limits.
optional int32 navigation_sources = 2;
// Number of sources discarded due to not matching a navigation URL.
optional int32 unmatched_sources = 3;
// Number of sources deferred from a previous interval.
optional int32 carryover_sources = 4;
// Number of sources deferred to the next interval. Sources corresponding to
// opened tabs that could emit more events in the future are kept in memory
// and deferred to the next interval for inclusion in next reports, up to a
// max limit on number of sources.
optional int32 deferred_sources = 5;
// Number of sources deferred to the next interval due to lack of events.
optional int32 entryless_sources = 6;
// Time elapsed in seconds from the moment the newest truncated source was
// created to the moment it was discarded from memory, if pruning happened
// due to number of sources exceeding the max threshold.
optional int32 pruned_sources_age_seconds = 7;
}
optional SourceCounts source_counts = 10;
// List of Entries containing the main UKM data.
repeated Entry entries = 4;
// Web features used on pages during this reporting interval.
repeated HighLevelWebFeatures web_features = 13;
// List of Entries containing aggregated UKM data.
repeated Aggregate aggregates = 7;
}