chromium/third_party/metrics_proto/trace_log.proto

// 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.

syntax = "proto2";

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

option java_outer_classname = "TraceLogProtos";

package metrics;

// 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
// //src/third_party/perfetto/protos/perfetto/trace/trace.proto

// 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.
  optional bytes raw_data = 1;

  reserved 3;

  enum CompressionType {
    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.
  optional CompressionType compression_type = 5
      [default = COMPRESSION_TYPE_NONE];
}