From 4443aa42512db5796a0c8a033c0b98533be80e79 Mon Sep 17 00:00:00 2001 From: Francis Tsui Date: Mon, 15 Apr 2024 15:42:55 -0700 Subject: [PATCH] Add experiment_log.proto PiperOrigin-RevId: 625106788 --- internal/proto/analytics/BUILD | 14 +++++++ .../proto/analytics/experiments_log.proto | 41 +++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 internal/proto/analytics/experiments_log.proto diff --git a/internal/proto/analytics/BUILD b/internal/proto/analytics/BUILD index 58be6950..52ca1719 100644 --- a/internal/proto/analytics/BUILD +++ b/internal/proto/analytics/BUILD @@ -56,6 +56,20 @@ cc_proto_library( deps = [":connections_log_proto"], ) +proto_library( + name = "experiments_log_proto", + srcs = ["experiments_log.proto"], +) + +cc_proto_library( + name = "experiments_log_cc_proto", + visibility = [ + "//location/nearby/analytics/cpp/logging:__subpackages__", + "//location/nearby/cpp/experiments:__subpackages__", + ], + deps = [":experiments_log_proto"], +) + cc_test( name = "proto_analytics_test", size = "small", diff --git a/internal/proto/analytics/experiments_log.proto b/internal/proto/analytics/experiments_log.proto new file mode 100644 index 00000000..622c6220 --- /dev/null +++ b/internal/proto/analytics/experiments_log.proto @@ -0,0 +1,41 @@ +// Copyright 2024 Google LLC +// +// 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 +// +// https://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"; + +package nearby.experiments; + +// import "storage/datapol/annotations/proto/semantic_annotations.proto"; + +option optimize_for = LITE_RUNTIME; +option java_outer_classname = "ExperimentsLogProtos"; +option java_package = "com.google.nearby.experiments"; +// option (datapol.file_vetting_status) = "latest"; + +// This proto encapsulates the experiments info to identify which logs belong +// to which experiments. It's passed from Phenotype +// (google3/location/nearby/cpp/experiments) to Clearcut event logger +// (google3/location/nearby/analytics/cpp/logging/) so that the event logger +// can generate the experiment-based Rasta metrics (go/rasta-overview). +// NextId: 3 +message ExperimentsLog { + // Experiment token associated with the Mendel config package. + optional bytes experiment_token = 1 + /* type = ST_EXPERIMENT_ID */; + + // Zwieback cookie shared between Phenotype and Clearcut clients so that + // Rasta metrics can reflect the correct population of devices. + optional string zwieback_cookie = 2 + /* type = ST_ZWIEBACK_ID */; +}