blob: c1963d50fb4fa0054db2f172344bc750acd0f53e [file] [log] [blame]
syntax = "proto3";
package cobalt;
import "src/pb/common.proto";
import "src/pb/encrypted_message.proto";
option java_multiple_files = true;
option java_package = "com.google.cobalt";
////////////////////////////////////////////////////////////////////////////////
// NOTE: This file is used by the Cobalt client and the Cobalt servers.
// The source-of-truth of this file is located in Google's internal code
// repository, and the file is automatically copied to Cobalt's open source
// repo where it is used by the Cobalt client code. Do not edit the copy of this
// file in the open-source repo as those edits will be overwritten when the file
// is next copied.
////////////////////////////////////////////////////////////////////////////////
// ObservationMetadata describes the parts of an observation other than the
// secret payload.
message ObservationMetadata {
// next id: 8
// An Observation is for a particular Metric.
// The following three values together specify that metric.
uint32 customer_id = 1;
uint32 project_id = 2;
uint32 metric_id = 3;
// Starting in Cobalt 1.0 an Observation is for a particular Report.
// The tuple (customer_id, project_id, metric_id, report_id) specifies the
// Report.
uint32 report_id = 7;
// The day on which the observation occurred, expressed as the zero-based
// index relative to January 1, 1970.
// i.e. 0 = January 1, 1970
// 1 = January 2, 1970
// etc.
//
// We intentionally leave the meaning of this vague and leave it to each
// Encoder Client to define how to make it precise. Which day it is depends on
// time zone. The Encoder client is free to use the local time zone or a
// different time zone. The Encoder client is free to add some random noise to
// the time at which an event occurred and this might change the day.
uint32 day_index = 4;
// The profile of the client system on which the Observation was collected.
SystemProfile system_profile = 5;
// We used to have a field called |backend|.
reserved 6;
reserved "backend";
}
// A batch of encrypted Observations with common metadata.
// The Observations are encrypted to the public key of an Analyzer so the
// Shuffler cannot read them. |Observation| is defined in Cobalt's
// observation.proto.
//
// ObservationBatches are used for both input to and output from the Shuffler.
// As input they are organized into Envelopes, each Envelope coming from some
// client device. |Envelope| is defined in Cobalt's envelope.proto.
//
// The output from the Shuffler consists of shuffled
// ObservationBatches, each ObservationBatch consisting of Observations
// from many clients.
//
message ObservationBatch {
// The common Metadata for all of the encrypted observations in this batch.
ObservationMetadata meta_data = 1;
// Each EncryptedMessage contains the ciphertext of an Observation that has
// been encrypted to the public key of the Analyzer.
repeated EncryptedMessage encrypted_observation = 2;
}