tracer: ensure x-ray segment field is not empty (#10520)

Initially the name of the segment defaulted to the local cluster/node
name. But since that too can be empty, and this tracer throws and
crashes if the segment is empty, then it's best to make the field
required and not use defaults.

Signed-off-by: Marco Magdy <mmagdy@gmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ e8654dbd4ba3b6cc8c33efbef7bf36d85cd882a0
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent fbf291e466
commit 4f409a223f
  1. 4
      envoy/config/trace/v2alpha/xray.proto
  2. 4
      envoy/config/trace/v3/xray.proto

@ -21,8 +21,8 @@ message XRayConfig {
// If this value is not set, the default value of 127.0.0.1:2000 will be used.
api.v2.core.SocketAddress daemon_endpoint = 1;
// The name of the X-Ray segment. By default this will be set to the cluster name.
string segment_name = 2;
// The name of the X-Ray segment.
string segment_name = 2 [(validate.rules).string = {min_len: 1}];
// The location of a local custom sampling rules JSON file.
// For an example of the sampling rules see:

@ -25,8 +25,8 @@ message XRayConfig {
// If this value is not set, the default value of 127.0.0.1:2000 will be used.
core.v3.SocketAddress daemon_endpoint = 1;
// The name of the X-Ray segment. By default this will be set to the cluster name.
string segment_name = 2;
// The name of the X-Ray segment.
string segment_name = 2 [(validate.rules).string = {min_len: 1}];
// The location of a local custom sampling rules JSON file.
// For an example of the sampling rules see:

Loading…
Cancel
Save