From 58aa89ae004cfe736641cb18e8f4a8ac3ce7dd21 Mon Sep 17 00:00:00 2001 From: hai007 Date: Tue, 4 Nov 2025 12:03:09 -0800 Subject: [PATCH] Add new analytics event for status of Cloud Sharing RPC calls. PiperOrigin-RevId: 828076707 --- proto/sharing_enums.proto | 5 ++++- .../proto/analytics/nearby_sharing_log.proto | 22 ++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/proto/sharing_enums.proto b/proto/sharing_enums.proto index c0244293..cf95c671 100644 --- a/proto/sharing_enums.proto +++ b/proto/sharing_enums.proto @@ -32,7 +32,7 @@ option objc_class_prefix = "GNSHP"; // in NearbyClearcutLogger (for android, or clearcut_event_logger as the // equivalence for Windows) for all events (may exclude settings), and // session_id for a pair of events (start and end of a session). -// Next id: 80 +// Next id: 81 enum EventType { UNKNOWN_EVENT_TYPE = 0; @@ -329,6 +329,9 @@ enum EventType { CLOUD_DOWNLOAD_END = 79 /*[ device_role = DEVICE_ROLE_REMOTE ]*/; // QR code cloud sharing events end. + // Cloud sharing RPC performance result + CLOUD_SHARING_RPC_RESULT = 80; + // LINT.ThenChange(//depot/google3/location/nearby/proto/nearby_event_codes.proto:SharingEventCode) } diff --git a/sharing/proto/analytics/nearby_sharing_log.proto b/sharing/proto/analytics/nearby_sharing_log.proto index b7ccbfc9..2946ab7f 100644 --- a/sharing/proto/analytics/nearby_sharing_log.proto +++ b/sharing/proto/analytics/nearby_sharing_log.proto @@ -30,7 +30,7 @@ option objc_class_prefix = "GNCP"; // Top-level log proto for all NearbySharing logging. // Each log contains a key (event_type), value (a verb-noun event) pair. -// Next Tag: 89 +// Next Tag: 90 // LINT.IfChange message SharingLog { /* justification = { @@ -239,6 +239,9 @@ message SharingLog { optional CloudDownloadEnd cloud_download_end = 88; + // Cloud sharing RPC call event. + optional CloudSharingRpcResult cloud_sharing_rpc_result = 89; + // Used only for Nearby Share Windows app now. message AppInfo { // e.g. "1.0.408" @@ -1086,5 +1089,22 @@ message SharingLog { message CloudDownloadEnd { repeated CloudAttachmentInfo download_infos = 1; } + + // EventType: CLOUD_SHARING_RPC_RESULT + // Event logging the result of a Cloud Sharing RPC call. This event captures + // the type of RPC, its outcome, and performance metrics. + message CloudSharingRpcResult { + // The specific RPC method that was called. + optional string rpc_name = 1; + // The canonical gRPC status code (io.grpc.Status.Code) resulting from the + // call. + optional int32 status_code = 2; + // The total time taken for the RPC call to complete, in milliseconds. + optional int64 latency_millis = 3; + // The unique identifier for the cloud sharing session, if available at the + // time of the call. This helps correlate RPC events to a specific sharing + // session. + optional string cloud_sharing_id = 4; + } } // LINT.ThenChange(//depot/google3/logs/proto/location/nearby/nearby_client_log.proto)