Skip to content

Commit

Permalink
Define proto field and collect/upload data to clearcut server
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 646534215
  • Loading branch information
hai007 authored and copybara-github committed Jul 5, 2024
1 parent cdf658c commit f224c65
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
29 changes: 29 additions & 0 deletions internal/proto/analytics/connections_log.proto
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,21 @@ message ConnectionsLog {
2;
}

message OperationResultWithMedium {
optional location.nearby.proto.connections.Medium medium = 1;

// Indicate which mediums belong to the same update API Call.
optional int32 update_index = 2;

// The category of the operation result
optional location.nearby.proto.connections.OperationResultCategory
result_category = 3;

// The result code of the operation result
optional location.nearby.proto.connections.OperationResultCode result_code =
4;
}

// One round of a particular Strategy done by a client.
message StrategySession {
// Elapsed time in milliseconds between a call to startAdvertising/Discovery
Expand Down Expand Up @@ -144,6 +159,13 @@ message ConnectionsLog {

// Encapsulates additional discovery information.
optional DiscoveryMetadata discovery_metadata = 7;

// Collect the discovery results of the mediums
repeated OperationResultWithMedium adv_dis_result = 8;

// The readon of stopping discoverying
optional location.nearby.proto.connections.StopDiscoveringReason
stop_reason = 9;
}

// An endpoint discovered on a particular medium during discovery.
Expand Down Expand Up @@ -222,6 +244,13 @@ message ConnectionsLog {

// Encapsulates additional advertising information.
optional AdvertisingMetadata advertising_metadata = 5;

// Collect the discovery results of the mediums
repeated OperationResultWithMedium adv_dis_result = 6;

// The readon of stopping advertising
optional location.nearby.proto.connections.StopAdvertisingReason
stop_reason = 7;
}

// A request to connect, corresponding to the API's concept of
Expand Down
16 changes: 16 additions & 0 deletions proto/connections_enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,22 @@ enum OperationResultCode {
// Bluetooth starts scanning without any client existed.
NEARBY_BLUETOOTH_NO_CLIENT_REGISTER_FOR_SCAN = 4585;
}

enum StopAdvertisingReason {
STOP_ADVERTISING_REASON_UNKNOWN = 0;
// Client call stopAdvertising() to stop advertising
CLIENT_STOP_ADVERTISING = 1;
// Session is finished and stop advertising
FINISH_SESSION_STOP_ADVERTISING = 2;
}

enum StopDiscoveringReason {
STOP_DISCOVERING_REASON_UNKNOWN = 0;
// Client call stopDiscovering() to stop discovering
CLIENT_STOP_DISCOVERING = 1;
// Session is finished and stop discovering
FINISH_SESSION_STOP_DISCOVERING = 2;
}
// LINT.ThenChange(
// //depot/google3/wireless/android/stats/platform/westworld/public/protos/enums/android/nearby/connections/enums.proto
// )

0 comments on commit f224c65

Please sign in to comment.