diff --git a/api/base.proto b/api/base.proto index 2c4b5ff31..736cb3270 100644 --- a/api/base.proto +++ b/api/base.proto @@ -227,3 +227,11 @@ message TransportSocket { // See the supported transport socket implementations for further documentation. google.protobuf.Struct config = 2; } + +// A percent, rounded down to the nearest 0.01%. Typically used to specify things like target +// sampling percentages among tracing requests (as in, e.g., :ref:`HTTP Connection Manager tracing +// `). +message HundredthsRoundedPercent { + // The percent, a float between 0 and 100. Rounded to the nearest 0.01%. + double value = 1 [(validate.rules).double = {gte: 0, lte: 100}]; +} diff --git a/api/filter/network/http_connection_manager.proto b/api/filter/network/http_connection_manager.proto index f442a617a..c73f3e68d 100644 --- a/api/filter/network/http_connection_manager.proto +++ b/api/filter/network/http_connection_manager.proto @@ -80,6 +80,23 @@ message HttpConnectionManager { // populate the tag name, and the header value is used to populate the tag value. The tag is // created if the specified header name is present in the request's headers. repeated string request_headers_for_tags = 2; + + // Target percentage of requests managed by this HTTP connectionmanager that will be force + // traced if the *x-client-trace-id* header is set. Defaults to 100%. This variable is a direct + // analog for the variable of the same name in the :ref:`HTTP Connection Manager + // `. + double client_sampling = 3 [(validate.rules).double = {gte: 0, lte: 100}]; + + // Target percentage of requests managed by this HTTP connection manager that will be traced + // after all other checks have been applied (force tracing, sampling, etc.). Defaults to 100%. + // This variable is a direct analog for the variable of the same name in the :ref:`HTTP + // Connection Manager `. + double sampling = 4 [(validate.rules).double = {gte: 0, lte: 100}]; + + // Target percentage of requests managed by this HTTP connection manager that will be randomly + // traced. Defaults to 100%. This variable is a direct analog for the variable of the same name + // in the :ref:`HTTP Connection Manager `. + HundredthsRoundedPercent random_sampling = 5; } // Presence of the object defines whether the connection manager