diff --git a/docs/BUILD b/docs/BUILD index 908e3a6f..e73cfed6 100644 --- a/docs/BUILD +++ b/docs/BUILD @@ -78,6 +78,7 @@ proto_library( "//envoy/config/resource_monitor/injected_resource/v2alpha:pkg", "//envoy/config/retry/previous_priorities:pkg", "//envoy/config/trace/v2:pkg", + "//envoy/config/trace/v2alpha:pkg", "//envoy/config/transport_socket/alts/v2alpha:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", "//envoy/data/accesslog/v2:pkg", diff --git a/envoy/config/trace/v2/trace.proto b/envoy/config/trace/v2/trace.proto index b419ae72..31dbd4e4 100644 --- a/envoy/config/trace/v2/trace.proto +++ b/envoy/config/trace/v2/trace.proto @@ -6,7 +6,6 @@ option java_package = "io.envoyproxy.envoy.config.trace.v2"; option java_outer_classname = "TraceProto"; option java_multiple_files = true; -import "envoy/api/v2/core/base.proto"; import "envoy/api/v2/core/grpc_service.proto"; import "google/protobuf/any.proto"; @@ -46,8 +45,7 @@ message Tracing { // - :ref:`DynamicOtConfig ` // - :ref:`DatadogConfig ` // - :ref:`OpenCensusConfig ` - // [#comment: TODO(marco) when XRay is implemented, uncomment the following; - :ref:`XRayConfig - // `] + // - :ref:`AWS X-Ray ` oneof config_type { google.protobuf.Struct config = 2 [deprecated = true]; @@ -208,20 +206,6 @@ message OpenCensusConfig { repeated TraceContext outgoing_trace_context = 9; } -// [#not-implemented-hide:] -// Configuration for AWS X-Ray tracer. -message XRayConfig { - // The endpoint of the X-Ray Daemon where the spans will be sent. Since by default daemon - // listens to localhost:2000, so the default value is 127.0.0.1:2000. - string daemon_endpoint = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The custom name to name a X-Ray segment. By default will use cluster name. - string segment_name = 2; - - // The location of custom sampling rule json file. - api.v2.core.DataSource sampling_rule_manifest = 3; -} - // Configuration structure. message TraceServiceConfig { // The upstream gRPC cluster that hosts the metrics service. diff --git a/envoy/config/trace/v2alpha/BUILD b/envoy/config/trace/v2alpha/BUILD new file mode 100644 index 00000000..97eb16cc --- /dev/null +++ b/envoy/config/trace/v2alpha/BUILD @@ -0,0 +1,9 @@ +# DO NOT EDIT. This file is generated by tools/proto_sync.py. + +load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") + +licenses(["notice"]) # Apache 2 + +api_proto_package( + deps = ["//envoy/api/v2/core:pkg"], +) diff --git a/envoy/config/trace/v2alpha/xray.proto b/envoy/config/trace/v2alpha/xray.proto new file mode 100644 index 00000000..53292833 --- /dev/null +++ b/envoy/config/trace/v2alpha/xray.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package envoy.config.trace.v2alpha; + +option java_package = "io.envoyproxy.envoy.config.trace.v2alpha"; +option java_outer_classname = "XrayProto"; +option java_multiple_files = true; + +import "envoy/api/v2/core/address.proto"; +import "envoy/api/v2/core/base.proto"; + +import "validate/validate.proto"; + +// [#protodoc-title: AWS X-Ray Tracer Configuration] +// Configuration for AWS X-Ray tracer + +message XRayConfig { + // The UDP endpoint of the X-Ray Daemon where the spans will be sent. + // 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 location of a local custom sampling rules JSON file. + // For an example of the sampling rules see: + // `X-Ray SDK documentation + // `_ + api.v2.core.DataSource sampling_rule_manifest = 3; +} diff --git a/envoy/config/trace/v3alpha/BUILD b/envoy/config/trace/v3alpha/BUILD index ce97eccf..59236641 100644 --- a/envoy/config/trace/v3alpha/BUILD +++ b/envoy/config/trace/v3alpha/BUILD @@ -8,6 +8,7 @@ api_proto_package( deps = [ "//envoy/api/v3alpha/core:pkg", "//envoy/config/trace/v2:pkg", + "//envoy/config/trace/v2alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto", ], diff --git a/envoy/config/trace/v3alpha/trace.proto b/envoy/config/trace/v3alpha/trace.proto index 9827738a..c837e07f 100644 --- a/envoy/config/trace/v3alpha/trace.proto +++ b/envoy/config/trace/v3alpha/trace.proto @@ -6,7 +6,6 @@ option java_package = "io.envoyproxy.envoy.config.trace.v3alpha"; option java_outer_classname = "TraceProto"; option java_multiple_files = true; -import "envoy/api/v3alpha/core/base.proto"; import "envoy/api/v3alpha/core/grpc_service.proto"; import "google/protobuf/any.proto"; @@ -56,8 +55,7 @@ message Tracing { // - :ref:`DynamicOtConfig ` // - :ref:`DatadogConfig ` // - :ref:`OpenCensusConfig ` - // [#comment: TODO(marco) when XRay is implemented, uncomment the following; - :ref:`XRayConfig - // `] + // - :ref:`AWS X-Ray ` oneof config_type { google.protobuf.Any typed_config = 3; } @@ -230,22 +228,6 @@ message OpenCensusConfig { repeated TraceContext outgoing_trace_context = 9; } -// [#not-implemented-hide:] -// Configuration for AWS X-Ray tracer. -message XRayConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.XRayConfig"; - - // The endpoint of the X-Ray Daemon where the spans will be sent. Since by default daemon - // listens to localhost:2000, so the default value is 127.0.0.1:2000. - string daemon_endpoint = 1 [(validate.rules).string = {min_bytes: 1}]; - - // The custom name to name a X-Ray segment. By default will use cluster name. - string segment_name = 2; - - // The location of custom sampling rule json file. - api.v3alpha.core.DataSource sampling_rule_manifest = 3; -} - // Configuration structure. message TraceServiceConfig { option (udpa.annotations.versioning).previous_message_type = diff --git a/envoy/config/trace/v3alpha/xray.proto b/envoy/config/trace/v3alpha/xray.proto new file mode 100644 index 00000000..4cd9753f --- /dev/null +++ b/envoy/config/trace/v3alpha/xray.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package envoy.config.trace.v3alpha; + +option java_package = "io.envoyproxy.envoy.config.trace.v3alpha"; +option java_outer_classname = "XrayProto"; +option java_multiple_files = true; + +import "envoy/api/v3alpha/core/address.proto"; +import "envoy/api/v3alpha/core/base.proto"; + +import "udpa/annotations/versioning.proto"; + +import "validate/validate.proto"; + +// [#protodoc-title: AWS X-Ray Tracer Configuration] +// Configuration for AWS X-Ray tracer + +message XRayConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.trace.v2alpha.XRayConfig"; + + // The UDP endpoint of the X-Ray Daemon where the spans will be sent. + // If this value is not set, the default value of 127.0.0.1:2000 will be used. + api.v3alpha.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 location of a local custom sampling rules JSON file. + // For an example of the sampling rules see: + // `X-Ray SDK documentation + // `_ + api.v3alpha.core.DataSource sampling_rule_manifest = 3; +}