blob: 720d4a8af88b97f8b11568073c6d95b8c899356c [file] [log] [blame]
// Copyright 2023 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package cobalt.browser.metrics;
import "histogram_event.proto";
import "reporting_info.proto";
import "user_action_event.proto";
// CobaltUMAEvent is a trimmed down version of the Chrome UMA
// ChromeUserMetricsExtension proto suitable for consumption by systems other
// than "official" UMA backends.
//
// IMPORTANT!! READ THIS BEFORE MODIFYING THIS PROTO!!
//
// As this proto definition is copied and reused downstream from Cobalt, this
// proto must be kept backwards compatible indefinitely. In short it means these
// rules must be followed:
//
// - Do not rename anything. Fields, messages, enums, etc. should always
// maintain their original names.
// - Do not reuse field numbers. Once a field number has been used, it can
// never used for a different field.
// - Do not change the "optional" or "required" status of a field.
// - Do not change the default value of a field.
//
// If you need to delete a field (including enum fields), reserve both the id
// and field name like so:
//
// BEFORE:
//
// optional int32 id = 42;
// enum MyEnum {
// FOO = 1;
// BAR = 2;
// }
//
// AFTER:
//
// // Deleted field "id", do not reuse tag numbers or field name.
// reserved 42;
// reserved "id";
//
// enum MyEnum {
// FOO = 1;
// // Deleted "BAR", do not reuse the field number or nname.
// reserved 2;
// reserved "BAR";
// }
//
// To deprecate a field use the "deprecated" tag as follows:
//
// // Deprecated, use bar_count instead.
// optional int32 foo_count = 7 [deprecated = true];
//
// Next ID: 4
message CobaltUMAEvent {
// Stores information about an event that occurs in response to a user action.
repeated .metrics.UserActionEventProto user_action_event = 1;
// Histogram-collected metrics.
repeated .metrics.HistogramEventProto histogram_event = 2;
// Extra information attached to reports by client at upload time. For
// example, failed attempt count, error codes, etc.
optional .metrics.ReportingInfo reporting_info = 3;
}