// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file was exported from google3, do not edit manually.
// See README.chromium for details.

edition = "2023";

option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.metrics";

option java_outer_classname = "TraceLogProtos";

package metrics;

option features.utf8_validation = NONE;

// The trace data is collected by Chrome tracing infrastructure to obtain a
// timeline model of events occurring in all Chrome processes and threads.
// Chrome uploads data as a serialized perfetto trace message. The proto format
// is defined in perfetto tracing library in
// https://github.com/google/perfetto/tree/HEAD/protos/perfetto/.

// Wrapper for the uploaded trace data, and parsed trace as stored in the logs.
// Next ID: 6
message TraceLog {
  // Client uploads the trace data as a byte buffer.
  bytes raw_data = 1;

  reserved 3;

  enum CompressionType {
    option features.enum_type = CLOSED;

    COMPRESSION_TYPE_NONE = 0;
    COMPRESSION_TYPE_ZLIB = 1;
  }

  // Some clients compress trace data before upload.
  // If this field has a value other than COMPRESSION_TYPE_NONE, |raw_data|
  // will contain the compressed trace.
  CompressionType compression_type = 5 [default = COMPRESSION_TYPE_NONE];
}
