Skip to content

Commit c5e3952

Browse files
Tap/Transport tap Enhance buffer trace to send tapped messages based on configured size (#39540)
Commit Message: Enhance transport tap buffer trace to send tapped messages based on configured size Additional Description: For buffer tracing, tapped messages are sent only on connection closure by default. This is suitable for HTTP/1 but not for HTTP/2. Tapped messages are sent based on the configured size is needed for HTTP/2 and later. Risk Level: Low Testing: Done the test in local. Docs Changes: Release Notes: Platform Specific Features: [Optional Runtime guard:] [Optional Fixes #Issue] [Optional Fixes commit #PR or SHA] [Optional Deprecated:] [Optional [API Considerations](https://github.com/envoyproxy/envoy/blob/main/api/review_checklist.md):] --------- Signed-off-by: fchen7 <[email protected]> Mirrored from https://github.com/envoyproxy/envoy @ 25037e74fcd73c65991aac8c3a19efc7db7ede86
1 parent 643a241 commit c5e3952

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

envoy/config/tap/v3/common.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ message HttpGenericBodyMatch {
154154
}
155155

156156
// Tap output configuration.
157+
// [#next-free-field: 6]
157158
message OutputConfig {
158159
option (udpa.annotations.versioning).previous_message_type =
159160
"envoy.service.tap.v2alpha.OutputConfig";
@@ -181,6 +182,12 @@ message OutputConfig {
181182
// match can be determined. See the HTTP tap filter :ref:`streaming
182183
// <config_http_filters_tap_streaming>` documentation for more information.
183184
bool streaming = 4;
185+
186+
// Tapped messages will be sent on each read/write event for streamed tapping by default.
187+
// But this behavior could be controlled by setting this field.
188+
// If set then the tapped messages will be send once the threshold is reached.
189+
// This could be used to avoid high frequent sending.
190+
google.protobuf.UInt32Value min_streamed_sent_bytes = 5;
184191
}
185192

186193
// Tap output sink configuration.

envoy/data/tap/v3/transport.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ message SocketBufferedTrace {
9696
bool write_truncated = 5;
9797
}
9898

99+
// A message for the sequence of observed events
100+
message SocketEvents {
101+
repeated SocketEvent events = 1;
102+
}
103+
99104
// A streamed socket trace segment. Multiple segments make up a full trace.
100105
message SocketStreamedTraceSegment {
101106
option (udpa.annotations.versioning).previous_message_type =
@@ -111,5 +116,8 @@ message SocketStreamedTraceSegment {
111116

112117
// Socket event.
113118
SocketEvent event = 3;
119+
120+
// Sequence of observed events.
121+
SocketEvents events = 4;
114122
}
115123
}

envoy/extensions/transport_sockets/tap/v3/tap.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ message SocketTapConfig {
4040
// Indicates to whether output the connection information per event
4141
// This is only applicable if the streamed trace is enabled
4242
bool set_connection_per_event = 1;
43+
44+
// The contents of the transport tap's statistics prefix.
45+
string stats_prefix = 2;
4346
}

0 commit comments

Comments
 (0)