Skip to content

Commit

Permalink
[1.17] Expose max_buffered_{rx/tx}_bytes in the Tap filter (#9656) (#…
Browse files Browse the repository at this point in the history
…10016) (#10032)

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
  • Loading branch information
andy-fong and soloio-bulldozer[bot] committed Sep 13, 2024
1 parent ba7a549 commit 7382c11
Show file tree
Hide file tree
Showing 7 changed files with 224 additions and 51 deletions.
9 changes: 9 additions & 0 deletions changelog/v1.17.8/new-fields-for-tap-filter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
changelog:
- type: FIX
issueLink: https://github.com/solo-io/gloo/issues/9656
resolvesIssue: false
description: >-
Expose max_buffered_{rx/tx}_bytes, record_headers_received_time
and record_downstream_connection settings for the Tap filter config.
Backported from v1.18 and this feature will be backported to
Enterprise version v1.17.2

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions install/helm/gloo/crds/gateway.solo.io_v1_Gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,22 @@ spec:
type: object
tap:
properties:
maxBufferedRxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
maxBufferedTxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
recordDownstreamConnection:
nullable: true
type: boolean
recordHeadersReceivedTime:
nullable: true
type: boolean
sinks:
items:
properties:
Expand Down Expand Up @@ -3220,6 +3236,22 @@ spec:
type: object
tap:
properties:
maxBufferedRxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
maxBufferedTxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
recordDownstreamConnection:
nullable: true
type: boolean
recordHeadersReceivedTime:
nullable: true
type: boolean
sinks:
items:
properties:
Expand Down
16 changes: 16 additions & 0 deletions install/helm/gloo/crds/gateway.solo.io_v1_HttpListenerOption.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,22 @@ spec:
type: object
tap:
properties:
maxBufferedRxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
maxBufferedTxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
recordDownstreamConnection:
nullable: true
type: boolean
recordHeadersReceivedTime:
nullable: true
type: boolean
sinks:
items:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,22 @@ spec:
type: object
tap:
properties:
maxBufferedRxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
maxBufferedTxBytes:
maximum: 4294967295
minimum: 0
nullable: true
type: integer
recordDownstreamConnection:
nullable: true
type: boolean
recordHeadersReceivedTime:
nullable: true
type: boolean
sinks:
items:
properties:
Expand Down
19 changes: 19 additions & 0 deletions projects/gloo/api/v1/enterprise/options/tap/tap.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option go_package = "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/options/ta

import "github.com/solo-io/solo-kit/api/v1/ref.proto";
import "validate/validate.proto";
import "google/protobuf/wrappers.proto";
import "google/protobuf/duration.proto";

// Tap filter: a filter that copies the contents of HTTP requests and responses
Expand All @@ -16,6 +17,24 @@ message Tap {
// Sinks to which tap data should be output. Currently, only a single sink
// is supported.
repeated Sink sinks = 1 [(validate.rules).repeated = {max_items: 1, min_items: 1}];

// For buffered tapping, the maximum amount of received body that will be buffered
// prior to truncation. If truncation occurs, the truncated field will be set.
// If not specified, the default is 1KiB.
google.protobuf.UInt32Value max_buffered_rx_bytes = 2;

// For buffered tapping, the maximum amount of transmitted body that will be buffered
// prior to truncation. If truncation occurs, the truncated field will be set.
// If not specified, the default is 1KiB.
google.protobuf.UInt32Value max_buffered_tx_bytes = 3;

// Indicates whether tap filter records the time stamp for request/response headers.
// Request headers time stamp is stored after receiving request headers.
// Response headers time stamp is stored after receiving response headers.
google.protobuf.BoolValue record_headers_received_time = 4;

// Indicates whether report downstream connection info
google.protobuf.BoolValue record_downstream_connection = 5;
}

message Sink {
Expand Down
Loading

0 comments on commit 7382c11

Please sign in to comment.