aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/protobuf
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2018-04-16 09:03:26 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-16 09:04:42 -0700
commit3b98838be61fa58d86805879a5fc4b13511ed69e (patch)
tree8bf6eb8c38591b3ff13564412268dc70165d1426 /src/main/protobuf
parent747f3468d20365a04923d8f7908968974aad17a0 (diff)
This CL adds log entry protos and logging handlers for bytestream Read and Write so that they are logged. I'm open to suggestions for the logging format for these calls, since we don't want to log the actual contents of reads/writes because of their size.
PiperOrigin-RevId: 193047886
Diffstat (limited to 'src/main/protobuf')
-rw-r--r--src/main/protobuf/BUILD1
-rw-r--r--src/main/protobuf/remote_execution_log.proto33
2 files changed, 34 insertions, 0 deletions
diff --git a/src/main/protobuf/BUILD b/src/main/protobuf/BUILD
index 02cc158a95..cb44e63d8c 100644
--- a/src/main/protobuf/BUILD
+++ b/src/main/protobuf/BUILD
@@ -147,6 +147,7 @@ proto_library(
name = "remote_execution_log_proto",
srcs = ["remote_execution_log.proto"],
deps = [
+ "@googleapis//:google_bytestream_bytestream_proto",
"@googleapis//:google_devtools_remoteexecution_v1test_remote_execution_proto",
"@googleapis//:google_longrunning_operations_proto",
"@googleapis//:google_rpc_status_proto",
diff --git a/src/main/protobuf/remote_execution_log.proto b/src/main/protobuf/remote_execution_log.proto
index 7bf9814c47..1e4fa9f404 100644
--- a/src/main/protobuf/remote_execution_log.proto
+++ b/src/main/protobuf/remote_execution_log.proto
@@ -16,6 +16,7 @@ syntax = "proto3";
package remote_logging;
+import "google/bytestream/bytestream.proto";
import "google/devtools/remoteexecution/v1test/remote_execution.proto";
import "google/longrunning/operations.proto";
import "google/rpc/status.proto";
@@ -84,6 +85,36 @@ message FindMissingBlobsDetails {
google.devtools.remoteexecution.v1test.FindMissingBlobsResponse response = 2;
}
+// Details for a call to google.bytestream.Read.
+message ReadDetails {
+ // The google.bytestream.ReadRequest sent.
+ google.bytestream.ReadRequest request = 1;
+
+ // The number of reads performed in this call.
+ int64 num_reads = 2;
+
+ // The total number of bytes read totalled over all stream responses.
+ int64 bytes_read = 3;
+}
+
+// Details for a call to google.bytestream.Write.
+message WriteDetails {
+ // The names of resources requested to be written to in this call in the order
+ // they were first requested in. If the ByteStream protocol is followed
+ // according to specification, this should only contain have a single element,
+ // which is the resource name specified in the first message of the stream.
+ repeated string resource_names = 1;
+
+ // The number of writes performed in this call.
+ int64 num_writes = 2;
+
+ // The total number of bytes sent over the stream.
+ int64 bytes_sent = 3;
+
+ // The received google.bytestream.WriteResponse.
+ google.bytestream.WriteResponse response = 4;
+}
+
// Contains details for specific types of calls.
message RpcCallDetails {
oneof details {
@@ -91,5 +122,7 @@ message RpcCallDetails {
GetActionResultDetails get_action_result = 2;
WatchDetails watch = 3;
FindMissingBlobsDetails find_missing_blobs = 4;
+ ReadDetails read = 5;
+ WriteDetails write = 6;
}
}