transport.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. syntax = "proto3";
  2. package envoy.data.tap.v3;
  3. import "envoy/config/core/v3/address.proto";
  4. import "envoy/data/tap/v3/common.proto";
  5. import "google/protobuf/timestamp.proto";
  6. import "udpa/annotations/status.proto";
  7. import "udpa/annotations/versioning.proto";
  8. option java_package = "io.envoyproxy.envoy.data.tap.v3";
  9. option java_outer_classname = "TransportProto";
  10. option java_multiple_files = true;
  11. option go_package = "github.com/envoyproxy/go-control-plane/envoy/data/tap/v3;tapv3";
  12. option (udpa.annotations.file_status).package_version_status = ACTIVE;
  13. // [#protodoc-title: Transport tap data]
  14. // Trace format for the tap transport socket extension. This dumps plain text read/write
  15. // sequences on a socket.
  16. // Connection properties.
  17. message Connection {
  18. option (udpa.annotations.versioning).previous_message_type = "envoy.data.tap.v2alpha.Connection";
  19. // Local address.
  20. config.core.v3.Address local_address = 2;
  21. // Remote address.
  22. config.core.v3.Address remote_address = 3;
  23. }
  24. // Event in a socket trace.
  25. message SocketEvent {
  26. option (udpa.annotations.versioning).previous_message_type = "envoy.data.tap.v2alpha.SocketEvent";
  27. // Data read by Envoy from the transport socket.
  28. message Read {
  29. // TODO(htuch): Half-close for reads.
  30. option (udpa.annotations.versioning).previous_message_type =
  31. "envoy.data.tap.v2alpha.SocketEvent.Read";
  32. // Binary data read.
  33. Body data = 1;
  34. }
  35. // Data written by Envoy to the transport socket.
  36. message Write {
  37. option (udpa.annotations.versioning).previous_message_type =
  38. "envoy.data.tap.v2alpha.SocketEvent.Write";
  39. // Binary data written.
  40. Body data = 1;
  41. // Stream was half closed after this write.
  42. bool end_stream = 2;
  43. }
  44. // The connection was closed.
  45. message Closed {
  46. // TODO(mattklein123): Close event type.
  47. option (udpa.annotations.versioning).previous_message_type =
  48. "envoy.data.tap.v2alpha.SocketEvent.Closed";
  49. }
  50. // Timestamp for event.
  51. google.protobuf.Timestamp timestamp = 1;
  52. // Read or write with content as bytes string.
  53. oneof event_selector {
  54. Read read = 2;
  55. Write write = 3;
  56. Closed closed = 4;
  57. }
  58. }
  59. // Sequence of read/write events that constitute a buffered trace on a socket.
  60. // [#next-free-field: 6]
  61. message SocketBufferedTrace {
  62. option (udpa.annotations.versioning).previous_message_type =
  63. "envoy.data.tap.v2alpha.SocketBufferedTrace";
  64. // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used
  65. // for long term stable uniqueness. Matches connection IDs used in Envoy logs.
  66. uint64 trace_id = 1;
  67. // Connection properties.
  68. Connection connection = 2;
  69. // Sequence of observed events.
  70. repeated SocketEvent events = 3;
  71. // Set to true if read events were truncated due to the :ref:`max_buffered_rx_bytes
  72. // <envoy_v3_api_field_config.tap.v3.OutputConfig.max_buffered_rx_bytes>` setting.
  73. bool read_truncated = 4;
  74. // Set to true if write events were truncated due to the :ref:`max_buffered_tx_bytes
  75. // <envoy_v3_api_field_config.tap.v3.OutputConfig.max_buffered_tx_bytes>` setting.
  76. bool write_truncated = 5;
  77. }
  78. // A streamed socket trace segment. Multiple segments make up a full trace.
  79. message SocketStreamedTraceSegment {
  80. option (udpa.annotations.versioning).previous_message_type =
  81. "envoy.data.tap.v2alpha.SocketStreamedTraceSegment";
  82. // Trace ID unique to the originating Envoy only. Trace IDs can repeat and should not be used
  83. // for long term stable uniqueness. Matches connection IDs used in Envoy logs.
  84. uint64 trace_id = 1;
  85. oneof message_piece {
  86. // Connection properties.
  87. Connection connection = 2;
  88. // Socket event.
  89. SocketEvent event = 3;
  90. }
  91. }