diff --git a/.azure-pipelines/pipelines.yml b/.azure-pipelines/pipelines.yml
index ddda20ece981..b7d2f94d3206 100644
--- a/.azure-pipelines/pipelines.yml
+++ b/.azure-pipelines/pipelines.yml
@@ -143,3 +143,6 @@ jobs:
TMPDIR: $(Agent.TempDirectory)
BAZEL_VC: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC"
BAZEL_SH: "C:\\Program Files\\Git\\bin\\bash.exe"
+ BAZEL_REMOTE_CACHE: grpcs://remotebuildexecution.googleapis.com
+ BAZEL_REMOTE_INSTANCE: projects/envoy-ci/instances/default_instance
+ GCP_SERVICE_ACCOUNT_KEY: $(GcpServiceAccountKey)
diff --git a/.bazelrc b/.bazelrc
index 648beb564106..028f8bf46785 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -158,8 +158,8 @@ build:remote-msan --config=rbe-toolchain-clang-libc++
build:remote-msan --config=rbe-toolchain-msan
# Docker sandbox
-# NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/master/toolchains/rbe_toolchains_config.bzl#L7
-build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu@sha256:ebf534b8aa505e8ff5663a31eed782942a742ae4d656b54f4236b00399f17911
+# NOTE: Update this from https://github.com/envoyproxy/envoy-build-tools/blob/master/toolchains/rbe_toolchains_config.bzl#L8
+build:docker-sandbox --experimental_docker_image=envoyproxy/envoy-build-ubuntu:09a5a914c904faa39dbc641181cb43b68cabf626
build:docker-sandbox --spawn_strategy=docker
build:docker-sandbox --strategy=Javac=docker
build:docker-sandbox --strategy=Closure=docker
diff --git a/.bazelversion b/.bazelversion
index ccbccc3dc626..4a36342fcab7 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-2.2.0
+3.0.0
diff --git a/CODEOWNERS b/CODEOWNERS
index 5e405f0c833d..37e376e77e79 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -32,6 +32,8 @@ extensions/filters/common/original_src @snowp @klarose
/*/extensions/transport_sockets/tls @PiotrSikora @lizan
# sni_cluster extension
/*/extensions/filters/network/sni_cluster @rshriram @lizan
+# sni_dynamic_forward_proxy extension
+/*/extensions/filters/network/sni_dynamic_forward_proxy @rshriram @lizan
# tracers.datadog extension
/*/extensions/tracers/datadog @cgilmour @palazzem @mattklein123
# tracers.xray extension
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 026e370aab0c..ffd804f25b81 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -52,7 +52,7 @@ versioning guidelines:
cause a configuration load failure, unless the feature in question is
explicitly overridden in
[runtime](https://www.envoyproxy.io/docs/envoy/latest/configuration/operations/runtime#using-runtime-overrides-for-deprecated-features)
- config ([example](configs/using_deprecated_config.v2.yaml)). Finally, following the deprecation
+ config ([example](configs/using_deprecated_config.v2.yaml)). Finally, following the deprecation
of the API major version where the field was first
marked deprecated, the entire implementation code will be removed from the Envoy implementation.
* This policy means that organizations deploying master should have some time to get ready for
@@ -63,7 +63,7 @@ versioning guidelines:
deprecation window. Within this window, a warning of deprecation should be carefully logged (some
features might need rate limiting for logging this). We make no guarantees about code or deployments
that rely on undocumented behavior.
-* All deprecations/breaking changes will be clearly listed in the [deprecated log](docs/root/intro/deprecated.rst).
+* All deprecations/breaking changes will be clearly listed in the [version history](docs/root/version_history/).
* High risk deprecations/breaking changes may be announced to the
[envoy-announce](https://groups.google.com/forum/#!forum/envoy-announce) email list but by default
it is expected the multi-phase warn-by-default/fail-by-default is sufficient to warn users to move
@@ -109,8 +109,8 @@ versioning guidelines:
changes for 7 days. Obviously PRs that are closed due to lack of activity can be reopened later.
Closing stale PRs helps us to keep on top of all of the work currently in flight.
* If a commit deprecates a feature, the commit message must mention what has been deprecated.
- Additionally, the [deprecated log](docs/root/intro/deprecated.rst) must be updated with relevant
- RST links for fields and messages as part of the commit.
+ Additionally, the [version history](docs/root/version_history/current.rst) must be updated with
+ relevant RST links for fields and messages as part of the commit.
* Please consider joining the [envoy-dev](https://groups.google.com/forum/#!forum/envoy-dev)
mailing list.
* If your PR involves any changes to
@@ -167,7 +167,7 @@ There are four suggested options for testing new runtime features:
3. Set up integration tests with custom runtime defaults as documented in the
[integration test README](https://github.com/envoyproxy/envoy/blob/master/test/integration/README.md)
4. Run a given unit test with the new runtime value explicitly set true as done
- for [runtime_flag_override_test](https://github.com/envoyproxy/envoy/blob/master/test/common/runtime/BUILD)
+ for [runtime_flag_override_test](https://github.com/envoyproxy/envoy/blob/master/test/common/runtime/BUILD)
Runtime code is held to the same standard as regular Envoy code, so both the old
path and the new should have 100% coverage both with the feature defaulting true
diff --git a/PULL_REQUESTS.md b/PULL_REQUESTS.md
index 91ed6e3f574f..deb77bb326fd 100644
--- a/PULL_REQUESTS.md
+++ b/PULL_REQUESTS.md
@@ -54,7 +54,7 @@ N/A if there were no documentation changes.
### Release notes
If this change is user impacting OR extension developer impacting (filter API, etc.) you **must**
-add a release note to the [version history](docs/root/version_history/current.rst) for the
+add a release note to the [version history](docs/root/version_history/current.rst) for the
current version. Please include any relevant links. Each release note should be prefixed with the
relevant subsystem in **alphabetical order** (see existing examples as a guide) and include links
to relevant parts of the documentation. Thank you! Please write in N/A if there are no release notes.
@@ -73,11 +73,10 @@ you may instead just tag the PR with the issue:
### Deprecated
-If this PR deprecates existing Envoy APIs or code, it should include
-an update to the [deprecated file](docs/root/intro/deprecated.rst) and a one line note in the PR
-description.
+If this PR deprecates existing Envoy APIs or code, it should include an update to the deprecated
+section of the [version history](docs/root/version_history/current.rst) and a one line note in the
+PR description.
If you mark existing APIs or code as deprecated, when the next release is cut, the
deprecation script will create and assign an issue to you for
cleaning up the deprecated code path.
-
diff --git a/api/BUILD b/api/BUILD
index 084351a7a7de..0dafe82267e9 100644
--- a/api/BUILD
+++ b/api/BUILD
@@ -216,6 +216,7 @@ proto_library(
"//envoy/extensions/filters/network/rbac/v3:pkg",
"//envoy/extensions/filters/network/redis_proxy/v3:pkg",
"//envoy/extensions/filters/network/sni_cluster/v3:pkg",
+ "//envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha:pkg",
"//envoy/extensions/filters/network/tcp_proxy/v3:pkg",
"//envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3:pkg",
"//envoy/extensions/filters/network/thrift_proxy/v3:pkg",
diff --git a/api/envoy/config/bootstrap/v2/bootstrap.proto b/api/envoy/config/bootstrap/v2/bootstrap.proto
index 0942c78bd4ab..622304483eb2 100644
--- a/api/envoy/config/bootstrap/v2/bootstrap.proto
+++ b/api/envoy/config/bootstrap/v2/bootstrap.proto
@@ -12,7 +12,7 @@ import "envoy/api/v2/core/socket_option.proto";
import "envoy/api/v2/listener.proto";
import "envoy/config/metrics/v2/stats.proto";
import "envoy/config/overload/v2alpha/overload.proto";
-import "envoy/config/trace/v2/trace.proto";
+import "envoy/config/trace/v2/http_tracer.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
diff --git a/api/envoy/config/bootstrap/v3/bootstrap.proto b/api/envoy/config/bootstrap/v3/bootstrap.proto
index 9df1bbd8372d..c8219d1b22e3 100644
--- a/api/envoy/config/bootstrap/v3/bootstrap.proto
+++ b/api/envoy/config/bootstrap/v3/bootstrap.proto
@@ -11,7 +11,7 @@ import "envoy/config/core/v3/socket_option.proto";
import "envoy/config/listener/v3/listener.proto";
import "envoy/config/metrics/v3/stats.proto";
import "envoy/config/overload/v3/overload.proto";
-import "envoy/config/trace/v3/trace.proto";
+import "envoy/config/trace/v3/http_tracer.proto";
import "envoy/extensions/transport_sockets/tls/v3/cert.proto";
import "google/protobuf/duration.proto";
diff --git a/api/envoy/config/core/v3/health_check.proto b/api/envoy/config/core/v3/health_check.proto
index 52dda6f9b3c2..f4ef02e0f966 100644
--- a/api/envoy/config/core/v3/health_check.proto
+++ b/api/envoy/config/core/v3/health_check.proto
@@ -87,11 +87,13 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The host header can be customized for a specific endpoint by setting the
// :ref:`hostname ` field.
- string host = 1;
+ string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
// Specifies the HTTP path that will be requested during health checking. For example
// */healthcheck*.
- string path = 2 [(validate.rules).string = {min_bytes: 1}];
+ string path = 2 [
+ (validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}
+ ];
// [#not-implemented-hide:] HTTP specific payload.
Payload send = 3;
@@ -108,7 +110,9 @@ message HealthCheck {
// Specifies a list of HTTP headers that should be removed from each request that is sent to the
// health checked cluster.
- repeated string request_headers_to_remove = 8;
+ repeated string request_headers_to_remove = 8 [(validate.rules).repeated = {
+ items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP response statuses considered healthy. If provided, replaces default
// 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open
@@ -169,7 +173,8 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The authority header can be customized for a specific endpoint by setting
// the :ref:`hostname ` field.
- string authority = 2;
+ string authority = 2
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
}
// Custom health check.
diff --git a/api/envoy/config/core/v4alpha/health_check.proto b/api/envoy/config/core/v4alpha/health_check.proto
index 0e6c4e73c2a2..1975c309a7de 100644
--- a/api/envoy/config/core/v4alpha/health_check.proto
+++ b/api/envoy/config/core/v4alpha/health_check.proto
@@ -87,11 +87,13 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The host header can be customized for a specific endpoint by setting the
// :ref:`hostname ` field.
- string host = 1;
+ string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
// Specifies the HTTP path that will be requested during health checking. For example
// */healthcheck*.
- string path = 2 [(validate.rules).string = {min_bytes: 1}];
+ string path = 2 [
+ (validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}
+ ];
// [#not-implemented-hide:] HTTP specific payload.
Payload send = 3;
@@ -108,7 +110,9 @@ message HealthCheck {
// Specifies a list of HTTP headers that should be removed from each request that is sent to the
// health checked cluster.
- repeated string request_headers_to_remove = 8;
+ repeated string request_headers_to_remove = 8 [(validate.rules).repeated = {
+ items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP response statuses considered healthy. If provided, replaces default
// 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open
@@ -169,7 +173,8 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The authority header can be customized for a specific endpoint by setting
// the :ref:`hostname ` field.
- string authority = 2;
+ string authority = 2
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
}
// Custom health check.
diff --git a/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto b/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
index f760c25dcde3..c78e69b2ae30 100644
--- a/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
+++ b/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
@@ -7,7 +7,7 @@ import "envoy/api/v2/core/protocol.proto";
import "envoy/api/v2/route.proto";
import "envoy/api/v2/scoped_route.proto";
import "envoy/config/filter/accesslog/v2/accesslog.proto";
-import "envoy/config/trace/v2/trace.proto";
+import "envoy/config/trace/v2/http_tracer.proto";
import "envoy/type/percent.proto";
import "envoy/type/tracing/v2/custom_tag.proto";
diff --git a/api/envoy/config/route/v3/route_components.proto b/api/envoy/config/route/v3/route_components.proto
index f63f0961249f..70c52010efa0 100644
--- a/api/envoy/config/route/v3/route_components.proto
+++ b/api/envoy/config/route/v3/route_components.proto
@@ -108,7 +108,9 @@ message VirtualHost {
// Specifies a list of HTTP headers that should be removed from each request
// handled by this virtual host.
- repeated string request_headers_to_remove = 13;
+ repeated string request_headers_to_remove = 13 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP headers that should be added to each response
// handled by this virtual host. Headers specified at this level are applied
@@ -252,7 +254,9 @@ message Route {
// Specifies a list of HTTP headers that should be removed from each request
// matching this route.
- repeated string request_headers_to_remove = 12;
+ repeated string request_headers_to_remove = 12 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a set of headers that will be added to responses to requests
// matching this route. Headers specified at this level are applied before
diff --git a/api/envoy/config/route/v4alpha/route_components.proto b/api/envoy/config/route/v4alpha/route_components.proto
index 33f8d64543df..e813b632edb0 100644
--- a/api/envoy/config/route/v4alpha/route_components.proto
+++ b/api/envoy/config/route/v4alpha/route_components.proto
@@ -108,7 +108,9 @@ message VirtualHost {
// Specifies a list of HTTP headers that should be removed from each request
// handled by this virtual host.
- repeated string request_headers_to_remove = 13;
+ repeated string request_headers_to_remove = 13 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP headers that should be added to each response
// handled by this virtual host. Headers specified at this level are applied
@@ -252,7 +254,9 @@ message Route {
// Specifies a list of HTTP headers that should be removed from each request
// matching this route.
- repeated string request_headers_to_remove = 12;
+ repeated string request_headers_to_remove = 12 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a set of headers that will be added to responses to requests
// matching this route. Headers specified at this level are applied before
diff --git a/api/envoy/config/trace/v2/datadog.proto b/api/envoy/config/trace/v2/datadog.proto
new file mode 100644
index 000000000000..0992601a8acc
--- /dev/null
+++ b/api/envoy/config/trace/v2/datadog.proto
@@ -0,0 +1,23 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "DatadogProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Datadog tracer]
+
+// Configuration for the Datadog tracer.
+// [#extension: envoy.tracers.datadog]
+message DatadogConfig {
+ // The cluster to use for submitting traces to the Datadog agent.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The name used for the service when traces are generated by envoy.
+ string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
+}
diff --git a/api/envoy/config/trace/v2/dynamic_ot.proto b/api/envoy/config/trace/v2/dynamic_ot.proto
new file mode 100644
index 000000000000..55c6d401b335
--- /dev/null
+++ b/api/envoy/config/trace/v2/dynamic_ot.proto
@@ -0,0 +1,29 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "DynamicOtProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Dynamically loadable OpenTracing tracer]
+
+// DynamicOtConfig is used to dynamically load a tracer from a shared library
+// that implements the `OpenTracing dynamic loading API
+// `_.
+// [#extension: envoy.tracers.dynamic_ot]
+message DynamicOtConfig {
+ // Dynamic library implementing the `OpenTracing API
+ // `_.
+ string library = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The configuration to use when creating a tracer from the given dynamic
+ // library.
+ google.protobuf.Struct config = 2;
+}
diff --git a/api/envoy/config/trace/v2/http_tracer.proto b/api/envoy/config/trace/v2/http_tracer.proto
new file mode 100644
index 000000000000..fba830b987b6
--- /dev/null
+++ b/api/envoy/config/trace/v2/http_tracer.proto
@@ -0,0 +1,65 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "HttpTracerProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Tracing]
+// Tracing :ref:`architecture overview `.
+
+// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
+//
+// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
+// supported.
+//
+// .. attention::
+//
+// Use of this message type has been deprecated in favor of direct use of
+// :ref:`Tracing.Http `.
+message Tracing {
+ // Configuration for an HTTP tracer provider used by Envoy.
+ //
+ // The configuration is defined by the
+ // :ref:`HttpConnectionManager.Tracing `
+ // :ref:`provider `
+ // field.
+ message Http {
+ // The name of the HTTP trace driver to instantiate. The name must match a
+ // supported HTTP trace driver. Built-in trace drivers:
+ //
+ // - *envoy.tracers.lightstep*
+ // - *envoy.tracers.zipkin*
+ // - *envoy.tracers.dynamic_ot*
+ // - *envoy.tracers.datadog*
+ // - *envoy.tracers.opencensus*
+ // - *envoy.tracers.xray*
+ string name = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // Trace driver specific configuration which depends on the driver being instantiated.
+ // See the trace drivers for examples:
+ //
+ // - :ref:`LightstepConfig `
+ // - :ref:`ZipkinConfig `
+ // - :ref:`DynamicOtConfig `
+ // - :ref:`DatadogConfig `
+ // - :ref:`OpenCensusConfig `
+ // - :ref:`AWS X-Ray `
+ oneof config_type {
+ google.protobuf.Struct config = 2 [deprecated = true];
+
+ google.protobuf.Any typed_config = 3;
+ }
+ }
+
+ // Provides configuration for the HTTP tracer.
+ Http http = 1;
+}
diff --git a/api/envoy/config/trace/v2/lightstep.proto b/api/envoy/config/trace/v2/lightstep.proto
new file mode 100644
index 000000000000..849749baaa0d
--- /dev/null
+++ b/api/envoy/config/trace/v2/lightstep.proto
@@ -0,0 +1,43 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "LightstepProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: LightStep tracer]
+
+// Configuration for the LightStep tracer.
+// [#extension: envoy.tracers.lightstep]
+message LightstepConfig {
+ // Available propagation modes
+ enum PropagationMode {
+ // Propagate trace context in the single header x-ot-span-context.
+ ENVOY = 0;
+
+ // Propagate trace context using LightStep's native format.
+ LIGHTSTEP = 1;
+
+ // Propagate trace context using the b3 format.
+ B3 = 2;
+
+ // Propagation trace context using the w3 trace-context standard.
+ TRACE_CONTEXT = 3;
+ }
+
+ // The cluster manager cluster that hosts the LightStep collectors.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // File containing the access token to the `LightStep
+ // `_ API.
+ string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Propagation modes to use by LightStep's tracer.
+ repeated PropagationMode propagation_modes = 3
+ [(validate.rules).repeated = {items {enum {defined_only: true}}}];
+}
diff --git a/api/envoy/config/trace/v2/opencensus.proto b/api/envoy/config/trace/v2/opencensus.proto
new file mode 100644
index 000000000000..8c8dab94a875
--- /dev/null
+++ b/api/envoy/config/trace/v2/opencensus.proto
@@ -0,0 +1,93 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "envoy/api/v2/core/grpc_service.proto";
+
+import "opencensus/proto/trace/v1/trace_config.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "OpencensusProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: OpenCensus tracer]
+
+// Configuration for the OpenCensus tracer.
+// [#next-free-field: 15]
+// [#extension: envoy.tracers.opencensus]
+message OpenCensusConfig {
+ enum TraceContext {
+ // No-op default, no trace context is utilized.
+ NONE = 0;
+
+ // W3C Trace-Context format "traceparent:" header.
+ TRACE_CONTEXT = 1;
+
+ // Binary "grpc-trace-bin:" header.
+ GRPC_TRACE_BIN = 2;
+
+ // "X-Cloud-Trace-Context:" header.
+ CLOUD_TRACE_CONTEXT = 3;
+
+ // X-B3-* headers.
+ B3 = 4;
+ }
+
+ reserved 7;
+
+ // Configures tracing, e.g. the sampler, max number of annotations, etc.
+ opencensus.proto.trace.v1.TraceConfig trace_config = 1;
+
+ // Enables the stdout exporter if set to true. This is intended for debugging
+ // purposes.
+ bool stdout_exporter_enabled = 2;
+
+ // Enables the Stackdriver exporter if set to true. The project_id must also
+ // be set.
+ bool stackdriver_exporter_enabled = 3;
+
+ // The Cloud project_id to use for Stackdriver tracing.
+ string stackdriver_project_id = 4;
+
+ // (optional) By default, the Stackdriver exporter will connect to production
+ // Stackdriver. If stackdriver_address is non-empty, it will instead connect
+ // to this address, which is in the gRPC format:
+ // https://github.com/grpc/grpc/blob/master/doc/naming.md
+ string stackdriver_address = 10;
+
+ // (optional) The gRPC server that hosts Stackdriver tracing service. Only
+ // Google gRPC is supported. If :ref:`target_uri `
+ // is not provided, the default production Stackdriver address will be used.
+ api.v2.core.GrpcService stackdriver_grpc_service = 13;
+
+ // Enables the Zipkin exporter if set to true. The url and service name must
+ // also be set.
+ bool zipkin_exporter_enabled = 5;
+
+ // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
+ string zipkin_url = 6;
+
+ // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
+ // ocagent_grpc_service must also be set.
+ bool ocagent_exporter_enabled = 11;
+
+ // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
+ // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
+ // [#comment:TODO: deprecate this field]
+ string ocagent_address = 12;
+
+ // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
+ // This is only used if the ocagent_address is left empty.
+ api.v2.core.GrpcService ocagent_grpc_service = 14;
+
+ // List of incoming trace context headers we will accept. First one found
+ // wins.
+ repeated TraceContext incoming_trace_context = 8;
+
+ // List of outgoing trace context headers we will produce.
+ repeated TraceContext outgoing_trace_context = 9;
+}
diff --git a/api/envoy/config/trace/v2/service.proto b/api/envoy/config/trace/v2/service.proto
new file mode 100644
index 000000000000..d102499b6261
--- /dev/null
+++ b/api/envoy/config/trace/v2/service.proto
@@ -0,0 +1,21 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "envoy/api/v2/core/grpc_service.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "ServiceProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Trace Service]
+
+// Configuration structure.
+message TraceServiceConfig {
+ // The upstream gRPC cluster that hosts the metrics service.
+ api.v2.core.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
+}
diff --git a/api/envoy/config/trace/v2/trace.proto b/api/envoy/config/trace/v2/trace.proto
index 308a97e4eef4..9f0670b28f7a 100644
--- a/api/envoy/config/trace/v2/trace.proto
+++ b/api/envoy/config/trace/v2/trace.proto
@@ -2,254 +2,16 @@ syntax = "proto3";
package envoy.config.trace.v2;
-import "envoy/api/v2/core/grpc_service.proto";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/wrappers.proto";
-
-import "opencensus/proto/trace/v1/trace_config.proto";
-
-import "envoy/annotations/deprecation.proto";
import "udpa/annotations/status.proto";
-import "validate/validate.proto";
+
+import public "envoy/config/trace/v2/datadog.proto";
+import public "envoy/config/trace/v2/dynamic_ot.proto";
+import public "envoy/config/trace/v2/http_tracer.proto";
+import public "envoy/config/trace/v2/lightstep.proto";
+import public "envoy/config/trace/v2/opencensus.proto";
+import public "envoy/config/trace/v2/service.proto";
+import public "envoy/config/trace/v2/zipkin.proto";
option java_package = "io.envoyproxy.envoy.config.trace.v2";
option java_outer_classname = "TraceProto";
option java_multiple_files = true;
-option (udpa.annotations.file_status).package_version_status = FROZEN;
-
-// [#protodoc-title: Tracing]
-// Tracing :ref:`architecture overview `.
-
-// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
-//
-// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
-// supported.
-//
-// .. attention::
-//
-// Use of this message type has been deprecated in favor of direct use of
-// :ref:`Tracing.Http `.
-message Tracing {
- // Configuration for an HTTP tracer provider used by Envoy.
- //
- // The configuration is defined by the
- // :ref:`HttpConnectionManager.Tracing `
- // :ref:`provider `
- // field.
- message Http {
- // The name of the HTTP trace driver to instantiate. The name must match a
- // supported HTTP trace driver. Built-in trace drivers:
- //
- // - *envoy.tracers.lightstep*
- // - *envoy.tracers.zipkin*
- // - *envoy.tracers.dynamic_ot*
- // - *envoy.tracers.datadog*
- // - *envoy.tracers.opencensus*
- // - *envoy.tracers.xray*
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // Trace driver specific configuration which depends on the driver being instantiated.
- // See the trace drivers for examples:
- //
- // - :ref:`LightstepConfig `
- // - :ref:`ZipkinConfig `
- // - :ref:`DynamicOtConfig `
- // - :ref:`DatadogConfig `
- // - :ref:`OpenCensusConfig `
- // - :ref:`AWS X-Ray `
- oneof config_type {
- google.protobuf.Struct config = 2 [deprecated = true];
-
- google.protobuf.Any typed_config = 3;
- }
- }
-
- // Provides configuration for the HTTP tracer.
- Http http = 1;
-}
-
-// Configuration for the LightStep tracer.
-// [#extension: envoy.tracers.lightstep]
-message LightstepConfig {
- // Available propagation modes
- enum PropagationMode {
- // Propagate trace context in the single header x-ot-span-context.
- ENVOY = 0;
-
- // Propagate trace context using LightStep's native format.
- LIGHTSTEP = 1;
-
- // Propagate trace context using the b3 format.
- B3 = 2;
-
- // Propagation trace context using the w3 trace-context standard.
- TRACE_CONTEXT = 3;
- }
-
- // The cluster manager cluster that hosts the LightStep collectors.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // File containing the access token to the `LightStep
- // `_ API.
- string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Propagation modes to use by LightStep's tracer.
- repeated PropagationMode propagation_modes = 3
- [(validate.rules).repeated = {items {enum {defined_only: true}}}];
-}
-
-// Configuration for the Zipkin tracer.
-// [#extension: envoy.tracers.zipkin]
-// [#next-free-field: 6]
-message ZipkinConfig {
- // Available Zipkin collector endpoint versions.
- enum CollectorEndpointVersion {
- // Zipkin API v1, JSON over HTTP.
- // [#comment: The default implementation of Zipkin client before this field is added was only v1
- // and the way user configure this was by not explicitly specifying the version. Consequently,
- // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
- // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
- // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
- // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
- HTTP_JSON_V1 = 0 [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
-
- // Zipkin API v2, JSON over HTTP.
- HTTP_JSON = 1;
-
- // Zipkin API v2, protobuf over HTTP.
- HTTP_PROTO = 2;
-
- // [#not-implemented-hide:]
- GRPC = 3;
- }
-
- // The cluster manager cluster that hosts the Zipkin collectors. Note that the
- // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
- // resources `.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The API endpoint of the Zipkin service where the spans will be sent. When
- // using a standard Zipkin installation, the API endpoint is typically
- // /api/v1/spans, which is the default value.
- string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Determines whether a 128bit trace id will be used when creating a new
- // trace instance. The default value is false, which will result in a 64 bit trace id being used.
- bool trace_id_128bit = 3;
-
- // Determines whether client and server spans will share the same span context.
- // The default value is true.
- google.protobuf.BoolValue shared_span_context = 4;
-
- // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
- // used.
- CollectorEndpointVersion collector_endpoint_version = 5;
-}
-
-// DynamicOtConfig is used to dynamically load a tracer from a shared library
-// that implements the `OpenTracing dynamic loading API
-// `_.
-// [#extension: envoy.tracers.dynamic_ot]
-message DynamicOtConfig {
- // Dynamic library implementing the `OpenTracing API
- // `_.
- string library = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The configuration to use when creating a tracer from the given dynamic
- // library.
- google.protobuf.Struct config = 2;
-}
-
-// Configuration for the Datadog tracer.
-// [#extension: envoy.tracers.datadog]
-message DatadogConfig {
- // The cluster to use for submitting traces to the Datadog agent.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The name used for the service when traces are generated by envoy.
- string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
-}
-
-// Configuration for the OpenCensus tracer.
-// [#next-free-field: 15]
-// [#extension: envoy.tracers.opencensus]
-message OpenCensusConfig {
- enum TraceContext {
- // No-op default, no trace context is utilized.
- NONE = 0;
-
- // W3C Trace-Context format "traceparent:" header.
- TRACE_CONTEXT = 1;
-
- // Binary "grpc-trace-bin:" header.
- GRPC_TRACE_BIN = 2;
-
- // "X-Cloud-Trace-Context:" header.
- CLOUD_TRACE_CONTEXT = 3;
-
- // X-B3-* headers.
- B3 = 4;
- }
-
- reserved 7;
-
- // Configures tracing, e.g. the sampler, max number of annotations, etc.
- opencensus.proto.trace.v1.TraceConfig trace_config = 1;
-
- // Enables the stdout exporter if set to true. This is intended for debugging
- // purposes.
- bool stdout_exporter_enabled = 2;
-
- // Enables the Stackdriver exporter if set to true. The project_id must also
- // be set.
- bool stackdriver_exporter_enabled = 3;
-
- // The Cloud project_id to use for Stackdriver tracing.
- string stackdriver_project_id = 4;
-
- // (optional) By default, the Stackdriver exporter will connect to production
- // Stackdriver. If stackdriver_address is non-empty, it will instead connect
- // to this address, which is in the gRPC format:
- // https://github.com/grpc/grpc/blob/master/doc/naming.md
- string stackdriver_address = 10;
-
- // (optional) The gRPC server that hosts Stackdriver tracing service. Only
- // Google gRPC is supported. If :ref:`target_uri `
- // is not provided, the default production Stackdriver address will be used.
- api.v2.core.GrpcService stackdriver_grpc_service = 13;
-
- // Enables the Zipkin exporter if set to true. The url and service name must
- // also be set.
- bool zipkin_exporter_enabled = 5;
-
- // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
- string zipkin_url = 6;
-
- // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
- // ocagent_grpc_service must also be set.
- bool ocagent_exporter_enabled = 11;
-
- // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
- // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
- // [#comment:TODO: deprecate this field]
- string ocagent_address = 12;
-
- // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
- // This is only used if the ocagent_address is left empty.
- api.v2.core.GrpcService ocagent_grpc_service = 14;
-
- // List of incoming trace context headers we will accept. First one found
- // wins.
- repeated TraceContext incoming_trace_context = 8;
-
- // List of outgoing trace context headers we will produce.
- repeated TraceContext outgoing_trace_context = 9;
-}
-
-// Configuration structure.
-message TraceServiceConfig {
- // The upstream gRPC cluster that hosts the metrics service.
- api.v2.core.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
-}
diff --git a/api/envoy/config/trace/v2/zipkin.proto b/api/envoy/config/trace/v2/zipkin.proto
new file mode 100644
index 000000000000..a825d85bb7f9
--- /dev/null
+++ b/api/envoy/config/trace/v2/zipkin.proto
@@ -0,0 +1,64 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "google/protobuf/wrappers.proto";
+
+import "envoy/annotations/deprecation.proto";
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "ZipkinProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Zipkin tracer]
+
+// Configuration for the Zipkin tracer.
+// [#extension: envoy.tracers.zipkin]
+// [#next-free-field: 6]
+message ZipkinConfig {
+ // Available Zipkin collector endpoint versions.
+ enum CollectorEndpointVersion {
+ // Zipkin API v1, JSON over HTTP.
+ // [#comment: The default implementation of Zipkin client before this field is added was only v1
+ // and the way user configure this was by not explicitly specifying the version. Consequently,
+ // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
+ // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
+ // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
+ // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
+ HTTP_JSON_V1 = 0 [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
+
+ // Zipkin API v2, JSON over HTTP.
+ HTTP_JSON = 1;
+
+ // Zipkin API v2, protobuf over HTTP.
+ HTTP_PROTO = 2;
+
+ // [#not-implemented-hide:]
+ GRPC = 3;
+ }
+
+ // The cluster manager cluster that hosts the Zipkin collectors. Note that the
+ // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
+ // resources `.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The API endpoint of the Zipkin service where the spans will be sent. When
+ // using a standard Zipkin installation, the API endpoint is typically
+ // /api/v1/spans, which is the default value.
+ string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Determines whether a 128bit trace id will be used when creating a new
+ // trace instance. The default value is false, which will result in a 64 bit trace id being used.
+ bool trace_id_128bit = 3;
+
+ // Determines whether client and server spans will share the same span context.
+ // The default value is true.
+ google.protobuf.BoolValue shared_span_context = 4;
+
+ // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
+ // used.
+ CollectorEndpointVersion collector_endpoint_version = 5;
+}
diff --git a/api/envoy/config/trace/v3/datadog.proto b/api/envoy/config/trace/v3/datadog.proto
new file mode 100644
index 000000000000..f1fe3e666125
--- /dev/null
+++ b/api/envoy/config/trace/v3/datadog.proto
@@ -0,0 +1,29 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "DatadogProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.datadog.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Datadog tracer]
+
+// Configuration for the Datadog tracer.
+// [#extension: envoy.tracers.datadog]
+message DatadogConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.DatadogConfig";
+
+ // The cluster to use for submitting traces to the Datadog agent.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The name used for the service when traces are generated by envoy.
+ string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
+}
diff --git a/api/envoy/config/trace/v3/dynamic_ot.proto b/api/envoy/config/trace/v3/dynamic_ot.proto
new file mode 100644
index 000000000000..fb372da8c52a
--- /dev/null
+++ b/api/envoy/config/trace/v3/dynamic_ot.proto
@@ -0,0 +1,36 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "DynamicOtProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package =
+ "envoy.extensions.tracers.dynamic_ot.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Dynamically loadable OpenTracing tracer]
+
+// DynamicOtConfig is used to dynamically load a tracer from a shared library
+// that implements the `OpenTracing dynamic loading API
+// `_.
+// [#extension: envoy.tracers.dynamic_ot]
+message DynamicOtConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.DynamicOtConfig";
+
+ // Dynamic library implementing the `OpenTracing API
+ // `_.
+ string library = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The configuration to use when creating a tracer from the given dynamic
+ // library.
+ google.protobuf.Struct config = 2;
+}
diff --git a/api/envoy/config/trace/v3/http_tracer.proto b/api/envoy/config/trace/v3/http_tracer.proto
new file mode 100644
index 000000000000..2a87a28db25e
--- /dev/null
+++ b/api/envoy/config/trace/v3/http_tracer.proto
@@ -0,0 +1,73 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "HttpTracerProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Tracing]
+// Tracing :ref:`architecture overview `.
+
+// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
+//
+// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
+// supported.
+//
+// .. attention::
+//
+// Use of this message type has been deprecated in favor of direct use of
+// :ref:`Tracing.Http `.
+message Tracing {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.Tracing";
+
+ // Configuration for an HTTP tracer provider used by Envoy.
+ //
+ // The configuration is defined by the
+ // :ref:`HttpConnectionManager.Tracing `
+ // :ref:`provider `
+ // field.
+ message Http {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.Tracing.Http";
+
+ reserved 2;
+
+ reserved "config";
+
+ // The name of the HTTP trace driver to instantiate. The name must match a
+ // supported HTTP trace driver. Built-in trace drivers:
+ //
+ // - *envoy.tracers.lightstep*
+ // - *envoy.tracers.zipkin*
+ // - *envoy.tracers.dynamic_ot*
+ // - *envoy.tracers.datadog*
+ // - *envoy.tracers.opencensus*
+ // - *envoy.tracers.xray*
+ string name = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // Trace driver specific configuration which depends on the driver being instantiated.
+ // See the trace drivers for examples:
+ //
+ // - :ref:`LightstepConfig `
+ // - :ref:`ZipkinConfig `
+ // - :ref:`DynamicOtConfig `
+ // - :ref:`DatadogConfig `
+ // - :ref:`OpenCensusConfig `
+ // - :ref:`AWS X-Ray `
+ oneof config_type {
+ google.protobuf.Any typed_config = 3;
+ }
+ }
+
+ // Provides configuration for the HTTP tracer.
+ Http http = 1;
+}
diff --git a/api/envoy/config/trace/v3/lightstep.proto b/api/envoy/config/trace/v3/lightstep.proto
new file mode 100644
index 000000000000..0e0b60b5bddb
--- /dev/null
+++ b/api/envoy/config/trace/v3/lightstep.proto
@@ -0,0 +1,50 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "LightstepProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package =
+ "envoy.extensions.tracers.lightstep.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: LightStep tracer]
+
+// Configuration for the LightStep tracer.
+// [#extension: envoy.tracers.lightstep]
+message LightstepConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.LightstepConfig";
+
+ // Available propagation modes
+ enum PropagationMode {
+ // Propagate trace context in the single header x-ot-span-context.
+ ENVOY = 0;
+
+ // Propagate trace context using LightStep's native format.
+ LIGHTSTEP = 1;
+
+ // Propagate trace context using the b3 format.
+ B3 = 2;
+
+ // Propagation trace context using the w3 trace-context standard.
+ TRACE_CONTEXT = 3;
+ }
+
+ // The cluster manager cluster that hosts the LightStep collectors.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // File containing the access token to the `LightStep
+ // `_ API.
+ string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Propagation modes to use by LightStep's tracer.
+ repeated PropagationMode propagation_modes = 3
+ [(validate.rules).repeated = {items {enum {defined_only: true}}}];
+}
diff --git a/api/envoy/config/trace/v3/opencensus.proto b/api/envoy/config/trace/v3/opencensus.proto
new file mode 100644
index 000000000000..39313139177f
--- /dev/null
+++ b/api/envoy/config/trace/v3/opencensus.proto
@@ -0,0 +1,100 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "envoy/config/core/v3/grpc_service.proto";
+
+import "opencensus/proto/trace/v1/trace_config.proto";
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "OpencensusProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package =
+ "envoy.extensions.tracers.opencensus.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: OpenCensus tracer]
+
+// Configuration for the OpenCensus tracer.
+// [#next-free-field: 15]
+// [#extension: envoy.tracers.opencensus]
+message OpenCensusConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.OpenCensusConfig";
+
+ enum TraceContext {
+ // No-op default, no trace context is utilized.
+ NONE = 0;
+
+ // W3C Trace-Context format "traceparent:" header.
+ TRACE_CONTEXT = 1;
+
+ // Binary "grpc-trace-bin:" header.
+ GRPC_TRACE_BIN = 2;
+
+ // "X-Cloud-Trace-Context:" header.
+ CLOUD_TRACE_CONTEXT = 3;
+
+ // X-B3-* headers.
+ B3 = 4;
+ }
+
+ reserved 7;
+
+ // Configures tracing, e.g. the sampler, max number of annotations, etc.
+ opencensus.proto.trace.v1.TraceConfig trace_config = 1;
+
+ // Enables the stdout exporter if set to true. This is intended for debugging
+ // purposes.
+ bool stdout_exporter_enabled = 2;
+
+ // Enables the Stackdriver exporter if set to true. The project_id must also
+ // be set.
+ bool stackdriver_exporter_enabled = 3;
+
+ // The Cloud project_id to use for Stackdriver tracing.
+ string stackdriver_project_id = 4;
+
+ // (optional) By default, the Stackdriver exporter will connect to production
+ // Stackdriver. If stackdriver_address is non-empty, it will instead connect
+ // to this address, which is in the gRPC format:
+ // https://github.com/grpc/grpc/blob/master/doc/naming.md
+ string stackdriver_address = 10;
+
+ // (optional) The gRPC server that hosts Stackdriver tracing service. Only
+ // Google gRPC is supported. If :ref:`target_uri `
+ // is not provided, the default production Stackdriver address will be used.
+ core.v3.GrpcService stackdriver_grpc_service = 13;
+
+ // Enables the Zipkin exporter if set to true. The url and service name must
+ // also be set.
+ bool zipkin_exporter_enabled = 5;
+
+ // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
+ string zipkin_url = 6;
+
+ // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
+ // ocagent_grpc_service must also be set.
+ bool ocagent_exporter_enabled = 11;
+
+ // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
+ // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
+ // [#comment:TODO: deprecate this field]
+ string ocagent_address = 12;
+
+ // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
+ // This is only used if the ocagent_address is left empty.
+ core.v3.GrpcService ocagent_grpc_service = 14;
+
+ // List of incoming trace context headers we will accept. First one found
+ // wins.
+ repeated TraceContext incoming_trace_context = 8;
+
+ // List of outgoing trace context headers we will produce.
+ repeated TraceContext outgoing_trace_context = 9;
+}
diff --git a/api/envoy/config/trace/v3/service.proto b/api/envoy/config/trace/v3/service.proto
new file mode 100644
index 000000000000..1e01ff61847f
--- /dev/null
+++ b/api/envoy/config/trace/v3/service.proto
@@ -0,0 +1,25 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "envoy/config/core/v3/grpc_service.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "ServiceProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Trace Service]
+
+// Configuration structure.
+message TraceServiceConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.TraceServiceConfig";
+
+ // The upstream gRPC cluster that hosts the metrics service.
+ core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
+}
diff --git a/api/envoy/config/trace/v3/trace.proto b/api/envoy/config/trace/v3/trace.proto
index 55534a895078..e1db72a2fd5a 100644
--- a/api/envoy/config/trace/v3/trace.proto
+++ b/api/envoy/config/trace/v3/trace.proto
@@ -2,280 +2,16 @@ syntax = "proto3";
package envoy.config.trace.v3;
-import "envoy/config/core/v3/grpc_service.proto";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/wrappers.proto";
-
-import "opencensus/proto/trace/v1/trace_config.proto";
-
-import "envoy/annotations/deprecation.proto";
import "udpa/annotations/status.proto";
-import "udpa/annotations/versioning.proto";
-import "validate/validate.proto";
+
+import public "envoy/config/trace/v3/datadog.proto";
+import public "envoy/config/trace/v3/dynamic_ot.proto";
+import public "envoy/config/trace/v3/http_tracer.proto";
+import public "envoy/config/trace/v3/lightstep.proto";
+import public "envoy/config/trace/v3/opencensus.proto";
+import public "envoy/config/trace/v3/service.proto";
+import public "envoy/config/trace/v3/zipkin.proto";
option java_package = "io.envoyproxy.envoy.config.trace.v3";
option java_outer_classname = "TraceProto";
option java_multiple_files = true;
-option (udpa.annotations.file_status).package_version_status = ACTIVE;
-
-// [#protodoc-title: Tracing]
-// Tracing :ref:`architecture overview `.
-
-// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
-//
-// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
-// supported.
-//
-// .. attention::
-//
-// Use of this message type has been deprecated in favor of direct use of
-// :ref:`Tracing.Http `.
-message Tracing {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.Tracing";
-
- // Configuration for an HTTP tracer provider used by Envoy.
- //
- // The configuration is defined by the
- // :ref:`HttpConnectionManager.Tracing `
- // :ref:`provider `
- // field.
- message Http {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.Tracing.Http";
-
- reserved 2;
-
- reserved "config";
-
- // The name of the HTTP trace driver to instantiate. The name must match a
- // supported HTTP trace driver. Built-in trace drivers:
- //
- // - *envoy.tracers.lightstep*
- // - *envoy.tracers.zipkin*
- // - *envoy.tracers.dynamic_ot*
- // - *envoy.tracers.datadog*
- // - *envoy.tracers.opencensus*
- // - *envoy.tracers.xray*
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // Trace driver specific configuration which depends on the driver being instantiated.
- // See the trace drivers for examples:
- //
- // - :ref:`LightstepConfig `
- // - :ref:`ZipkinConfig `
- // - :ref:`DynamicOtConfig `
- // - :ref:`DatadogConfig `
- // - :ref:`OpenCensusConfig `
- // - :ref:`AWS X-Ray `
- oneof config_type {
- google.protobuf.Any typed_config = 3;
- }
- }
-
- // Provides configuration for the HTTP tracer.
- Http http = 1;
-}
-
-// Configuration for the LightStep tracer.
-// [#extension: envoy.tracers.lightstep]
-message LightstepConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.LightstepConfig";
-
- // Available propagation modes
- enum PropagationMode {
- // Propagate trace context in the single header x-ot-span-context.
- ENVOY = 0;
-
- // Propagate trace context using LightStep's native format.
- LIGHTSTEP = 1;
-
- // Propagate trace context using the b3 format.
- B3 = 2;
-
- // Propagation trace context using the w3 trace-context standard.
- TRACE_CONTEXT = 3;
- }
-
- // The cluster manager cluster that hosts the LightStep collectors.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // File containing the access token to the `LightStep
- // `_ API.
- string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Propagation modes to use by LightStep's tracer.
- repeated PropagationMode propagation_modes = 3
- [(validate.rules).repeated = {items {enum {defined_only: true}}}];
-}
-
-// Configuration for the Zipkin tracer.
-// [#extension: envoy.tracers.zipkin]
-// [#next-free-field: 6]
-message ZipkinConfig {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.ZipkinConfig";
-
- // Available Zipkin collector endpoint versions.
- enum CollectorEndpointVersion {
- // Zipkin API v1, JSON over HTTP.
- // [#comment: The default implementation of Zipkin client before this field is added was only v1
- // and the way user configure this was by not explicitly specifying the version. Consequently,
- // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
- // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
- // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
- // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
- DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0
- [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
-
- // Zipkin API v2, JSON over HTTP.
- HTTP_JSON = 1;
-
- // Zipkin API v2, protobuf over HTTP.
- HTTP_PROTO = 2;
-
- // [#not-implemented-hide:]
- GRPC = 3;
- }
-
- // The cluster manager cluster that hosts the Zipkin collectors. Note that the
- // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
- // resources `.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The API endpoint of the Zipkin service where the spans will be sent. When
- // using a standard Zipkin installation, the API endpoint is typically
- // /api/v1/spans, which is the default value.
- string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Determines whether a 128bit trace id will be used when creating a new
- // trace instance. The default value is false, which will result in a 64 bit trace id being used.
- bool trace_id_128bit = 3;
-
- // Determines whether client and server spans will share the same span context.
- // The default value is true.
- google.protobuf.BoolValue shared_span_context = 4;
-
- // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
- // used.
- CollectorEndpointVersion collector_endpoint_version = 5;
-}
-
-// DynamicOtConfig is used to dynamically load a tracer from a shared library
-// that implements the `OpenTracing dynamic loading API
-// `_.
-// [#extension: envoy.tracers.dynamic_ot]
-message DynamicOtConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.DynamicOtConfig";
-
- // Dynamic library implementing the `OpenTracing API
- // `_.
- string library = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The configuration to use when creating a tracer from the given dynamic
- // library.
- google.protobuf.Struct config = 2;
-}
-
-// Configuration for the Datadog tracer.
-// [#extension: envoy.tracers.datadog]
-message DatadogConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.DatadogConfig";
-
- // The cluster to use for submitting traces to the Datadog agent.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The name used for the service when traces are generated by envoy.
- string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
-}
-
-// Configuration for the OpenCensus tracer.
-// [#next-free-field: 15]
-// [#extension: envoy.tracers.opencensus]
-message OpenCensusConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.OpenCensusConfig";
-
- enum TraceContext {
- // No-op default, no trace context is utilized.
- NONE = 0;
-
- // W3C Trace-Context format "traceparent:" header.
- TRACE_CONTEXT = 1;
-
- // Binary "grpc-trace-bin:" header.
- GRPC_TRACE_BIN = 2;
-
- // "X-Cloud-Trace-Context:" header.
- CLOUD_TRACE_CONTEXT = 3;
-
- // X-B3-* headers.
- B3 = 4;
- }
-
- reserved 7;
-
- // Configures tracing, e.g. the sampler, max number of annotations, etc.
- opencensus.proto.trace.v1.TraceConfig trace_config = 1;
-
- // Enables the stdout exporter if set to true. This is intended for debugging
- // purposes.
- bool stdout_exporter_enabled = 2;
-
- // Enables the Stackdriver exporter if set to true. The project_id must also
- // be set.
- bool stackdriver_exporter_enabled = 3;
-
- // The Cloud project_id to use for Stackdriver tracing.
- string stackdriver_project_id = 4;
-
- // (optional) By default, the Stackdriver exporter will connect to production
- // Stackdriver. If stackdriver_address is non-empty, it will instead connect
- // to this address, which is in the gRPC format:
- // https://github.com/grpc/grpc/blob/master/doc/naming.md
- string stackdriver_address = 10;
-
- // (optional) The gRPC server that hosts Stackdriver tracing service. Only
- // Google gRPC is supported. If :ref:`target_uri `
- // is not provided, the default production Stackdriver address will be used.
- core.v3.GrpcService stackdriver_grpc_service = 13;
-
- // Enables the Zipkin exporter if set to true. The url and service name must
- // also be set.
- bool zipkin_exporter_enabled = 5;
-
- // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
- string zipkin_url = 6;
-
- // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
- // ocagent_grpc_service must also be set.
- bool ocagent_exporter_enabled = 11;
-
- // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
- // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
- // [#comment:TODO: deprecate this field]
- string ocagent_address = 12;
-
- // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
- // This is only used if the ocagent_address is left empty.
- core.v3.GrpcService ocagent_grpc_service = 14;
-
- // List of incoming trace context headers we will accept. First one found
- // wins.
- repeated TraceContext incoming_trace_context = 8;
-
- // List of outgoing trace context headers we will produce.
- repeated TraceContext outgoing_trace_context = 9;
-}
-
-// Configuration structure.
-message TraceServiceConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.TraceServiceConfig";
-
- // The upstream gRPC cluster that hosts the metrics service.
- core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
-}
diff --git a/api/envoy/config/trace/v3/xray.proto b/api/envoy/config/trace/v3/xray.proto
index c4259177d657..ba3fa66ad3e2 100644
--- a/api/envoy/config/trace/v3/xray.proto
+++ b/api/envoy/config/trace/v3/xray.proto
@@ -5,6 +5,7 @@ package envoy.config.trace.v3;
import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/base.proto";
+import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
@@ -12,6 +13,7 @@ import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.trace.v3";
option java_outer_classname = "XrayProto";
option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.xray.v4alpha";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: AWS X-Ray Tracer Configuration]
diff --git a/api/envoy/config/trace/v3/zipkin.proto b/api/envoy/config/trace/v3/zipkin.proto
new file mode 100644
index 000000000000..5c5349cdf155
--- /dev/null
+++ b/api/envoy/config/trace/v3/zipkin.proto
@@ -0,0 +1,70 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "google/protobuf/wrappers.proto";
+
+import "envoy/annotations/deprecation.proto";
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "ZipkinProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.zipkin.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Zipkin tracer]
+
+// Configuration for the Zipkin tracer.
+// [#extension: envoy.tracers.zipkin]
+// [#next-free-field: 6]
+message ZipkinConfig {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.ZipkinConfig";
+
+ // Available Zipkin collector endpoint versions.
+ enum CollectorEndpointVersion {
+ // Zipkin API v1, JSON over HTTP.
+ // [#comment: The default implementation of Zipkin client before this field is added was only v1
+ // and the way user configure this was by not explicitly specifying the version. Consequently,
+ // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
+ // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
+ // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
+ // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
+ DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0
+ [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
+
+ // Zipkin API v2, JSON over HTTP.
+ HTTP_JSON = 1;
+
+ // Zipkin API v2, protobuf over HTTP.
+ HTTP_PROTO = 2;
+
+ // [#not-implemented-hide:]
+ GRPC = 3;
+ }
+
+ // The cluster manager cluster that hosts the Zipkin collectors. Note that the
+ // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
+ // resources `.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The API endpoint of the Zipkin service where the spans will be sent. When
+ // using a standard Zipkin installation, the API endpoint is typically
+ // /api/v1/spans, which is the default value.
+ string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Determines whether a 128bit trace id will be used when creating a new
+ // trace instance. The default value is false, which will result in a 64 bit trace id being used.
+ bool trace_id_128bit = 3;
+
+ // Determines whether client and server spans will share the same span context.
+ // The default value is true.
+ google.protobuf.BoolValue shared_span_context = 4;
+
+ // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
+ // used.
+ CollectorEndpointVersion collector_endpoint_version = 5;
+}
diff --git a/api/envoy/config/trace/v4alpha/BUILD b/api/envoy/config/trace/v4alpha/BUILD
index 53ae98aac140..d8ce683c41d6 100644
--- a/api/envoy/config/trace/v4alpha/BUILD
+++ b/api/envoy/config/trace/v4alpha/BUILD
@@ -6,10 +6,8 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
- "//envoy/annotations:pkg",
"//envoy/config/core/v4alpha:pkg",
"//envoy/config/trace/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
- "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto",
],
)
diff --git a/api/envoy/config/trace/v4alpha/http_tracer.proto b/api/envoy/config/trace/v4alpha/http_tracer.proto
new file mode 100644
index 000000000000..663886a97bb4
--- /dev/null
+++ b/api/envoy/config/trace/v4alpha/http_tracer.proto
@@ -0,0 +1,73 @@
+syntax = "proto3";
+
+package envoy.config.trace.v4alpha;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
+option java_outer_classname = "HttpTracerProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Tracing]
+// Tracing :ref:`architecture overview `.
+
+// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
+//
+// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
+// supported.
+//
+// .. attention::
+//
+// Use of this message type has been deprecated in favor of direct use of
+// :ref:`Tracing.Http `.
+message Tracing {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.Tracing";
+
+ // Configuration for an HTTP tracer provider used by Envoy.
+ //
+ // The configuration is defined by the
+ // :ref:`HttpConnectionManager.Tracing `
+ // :ref:`provider `
+ // field.
+ message Http {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.Tracing.Http";
+
+ reserved 2;
+
+ reserved "config";
+
+ // The name of the HTTP trace driver to instantiate. The name must match a
+ // supported HTTP trace driver. Built-in trace drivers:
+ //
+ // - *envoy.tracers.lightstep*
+ // - *envoy.tracers.zipkin*
+ // - *envoy.tracers.dynamic_ot*
+ // - *envoy.tracers.datadog*
+ // - *envoy.tracers.opencensus*
+ // - *envoy.tracers.xray*
+ string name = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // Trace driver specific configuration which depends on the driver being instantiated.
+ // See the trace drivers for examples:
+ //
+ // - :ref:`LightstepConfig `
+ // - :ref:`ZipkinConfig `
+ // - :ref:`DynamicOtConfig `
+ // - :ref:`DatadogConfig `
+ // - :ref:`OpenCensusConfig `
+ // - :ref:`AWS X-Ray `
+ oneof config_type {
+ google.protobuf.Any typed_config = 3;
+ }
+ }
+
+ // Provides configuration for the HTTP tracer.
+ Http http = 1;
+}
diff --git a/api/envoy/config/trace/v4alpha/service.proto b/api/envoy/config/trace/v4alpha/service.proto
new file mode 100644
index 000000000000..d132b32dd79d
--- /dev/null
+++ b/api/envoy/config/trace/v4alpha/service.proto
@@ -0,0 +1,25 @@
+syntax = "proto3";
+
+package envoy.config.trace.v4alpha;
+
+import "envoy/config/core/v4alpha/grpc_service.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
+option java_outer_classname = "ServiceProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Trace Service]
+
+// Configuration structure.
+message TraceServiceConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.TraceServiceConfig";
+
+ // The upstream gRPC cluster that hosts the metrics service.
+ core.v4alpha.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
+}
diff --git a/api/envoy/config/trace/v4alpha/trace.proto b/api/envoy/config/trace/v4alpha/trace.proto
deleted file mode 100644
index f43c8df24b33..000000000000
--- a/api/envoy/config/trace/v4alpha/trace.proto
+++ /dev/null
@@ -1,281 +0,0 @@
-syntax = "proto3";
-
-package envoy.config.trace.v4alpha;
-
-import "envoy/config/core/v4alpha/grpc_service.proto";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/wrappers.proto";
-
-import "opencensus/proto/trace/v1/trace_config.proto";
-
-import "envoy/annotations/deprecation.proto";
-import "udpa/annotations/status.proto";
-import "udpa/annotations/versioning.proto";
-import "validate/validate.proto";
-
-option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
-option java_outer_classname = "TraceProto";
-option java_multiple_files = true;
-option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
-
-// [#protodoc-title: Tracing]
-// Tracing :ref:`architecture overview `.
-
-// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
-//
-// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
-// supported.
-//
-// .. attention::
-//
-// Use of this message type has been deprecated in favor of direct use of
-// :ref:`Tracing.Http `.
-message Tracing {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.Tracing";
-
- // Configuration for an HTTP tracer provider used by Envoy.
- //
- // The configuration is defined by the
- // :ref:`HttpConnectionManager.Tracing `
- // :ref:`provider `
- // field.
- message Http {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.Tracing.Http";
-
- reserved 2;
-
- reserved "config";
-
- // The name of the HTTP trace driver to instantiate. The name must match a
- // supported HTTP trace driver. Built-in trace drivers:
- //
- // - *envoy.tracers.lightstep*
- // - *envoy.tracers.zipkin*
- // - *envoy.tracers.dynamic_ot*
- // - *envoy.tracers.datadog*
- // - *envoy.tracers.opencensus*
- // - *envoy.tracers.xray*
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // Trace driver specific configuration which depends on the driver being instantiated.
- // See the trace drivers for examples:
- //
- // - :ref:`LightstepConfig `
- // - :ref:`ZipkinConfig `
- // - :ref:`DynamicOtConfig `
- // - :ref:`DatadogConfig `
- // - :ref:`OpenCensusConfig `
- // - :ref:`AWS X-Ray `
- oneof config_type {
- google.protobuf.Any typed_config = 3;
- }
- }
-
- // Provides configuration for the HTTP tracer.
- Http http = 1;
-}
-
-// Configuration for the LightStep tracer.
-// [#extension: envoy.tracers.lightstep]
-message LightstepConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.LightstepConfig";
-
- // Available propagation modes
- enum PropagationMode {
- // Propagate trace context in the single header x-ot-span-context.
- ENVOY = 0;
-
- // Propagate trace context using LightStep's native format.
- LIGHTSTEP = 1;
-
- // Propagate trace context using the b3 format.
- B3 = 2;
-
- // Propagation trace context using the w3 trace-context standard.
- TRACE_CONTEXT = 3;
- }
-
- // The cluster manager cluster that hosts the LightStep collectors.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // File containing the access token to the `LightStep
- // `_ API.
- string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Propagation modes to use by LightStep's tracer.
- repeated PropagationMode propagation_modes = 3
- [(validate.rules).repeated = {items {enum {defined_only: true}}}];
-}
-
-// Configuration for the Zipkin tracer.
-// [#extension: envoy.tracers.zipkin]
-// [#next-free-field: 6]
-message ZipkinConfig {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.ZipkinConfig";
-
- // Available Zipkin collector endpoint versions.
- enum CollectorEndpointVersion {
- // Zipkin API v1, JSON over HTTP.
- // [#comment: The default implementation of Zipkin client before this field is added was only v1
- // and the way user configure this was by not explicitly specifying the version. Consequently,
- // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
- // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
- // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
- // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
- DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0
- [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
-
- // Zipkin API v2, JSON over HTTP.
- HTTP_JSON = 1;
-
- // Zipkin API v2, protobuf over HTTP.
- HTTP_PROTO = 2;
-
- // [#not-implemented-hide:]
- GRPC = 3;
- }
-
- // The cluster manager cluster that hosts the Zipkin collectors. Note that the
- // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
- // resources `.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The API endpoint of the Zipkin service where the spans will be sent. When
- // using a standard Zipkin installation, the API endpoint is typically
- // /api/v1/spans, which is the default value.
- string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Determines whether a 128bit trace id will be used when creating a new
- // trace instance. The default value is false, which will result in a 64 bit trace id being used.
- bool trace_id_128bit = 3;
-
- // Determines whether client and server spans will share the same span context.
- // The default value is true.
- google.protobuf.BoolValue shared_span_context = 4;
-
- // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
- // used.
- CollectorEndpointVersion collector_endpoint_version = 5;
-}
-
-// DynamicOtConfig is used to dynamically load a tracer from a shared library
-// that implements the `OpenTracing dynamic loading API
-// `_.
-// [#extension: envoy.tracers.dynamic_ot]
-message DynamicOtConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.DynamicOtConfig";
-
- // Dynamic library implementing the `OpenTracing API
- // `_.
- string library = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The configuration to use when creating a tracer from the given dynamic
- // library.
- google.protobuf.Struct config = 2;
-}
-
-// Configuration for the Datadog tracer.
-// [#extension: envoy.tracers.datadog]
-message DatadogConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.DatadogConfig";
-
- // The cluster to use for submitting traces to the Datadog agent.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The name used for the service when traces are generated by envoy.
- string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
-}
-
-// Configuration for the OpenCensus tracer.
-// [#next-free-field: 15]
-// [#extension: envoy.tracers.opencensus]
-message OpenCensusConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.OpenCensusConfig";
-
- enum TraceContext {
- // No-op default, no trace context is utilized.
- NONE = 0;
-
- // W3C Trace-Context format "traceparent:" header.
- TRACE_CONTEXT = 1;
-
- // Binary "grpc-trace-bin:" header.
- GRPC_TRACE_BIN = 2;
-
- // "X-Cloud-Trace-Context:" header.
- CLOUD_TRACE_CONTEXT = 3;
-
- // X-B3-* headers.
- B3 = 4;
- }
-
- reserved 7;
-
- // Configures tracing, e.g. the sampler, max number of annotations, etc.
- opencensus.proto.trace.v1.TraceConfig trace_config = 1;
-
- // Enables the stdout exporter if set to true. This is intended for debugging
- // purposes.
- bool stdout_exporter_enabled = 2;
-
- // Enables the Stackdriver exporter if set to true. The project_id must also
- // be set.
- bool stackdriver_exporter_enabled = 3;
-
- // The Cloud project_id to use for Stackdriver tracing.
- string stackdriver_project_id = 4;
-
- // (optional) By default, the Stackdriver exporter will connect to production
- // Stackdriver. If stackdriver_address is non-empty, it will instead connect
- // to this address, which is in the gRPC format:
- // https://github.com/grpc/grpc/blob/master/doc/naming.md
- string stackdriver_address = 10;
-
- // (optional) The gRPC server that hosts Stackdriver tracing service. Only
- // Google gRPC is supported. If :ref:`target_uri `
- // is not provided, the default production Stackdriver address will be used.
- core.v4alpha.GrpcService stackdriver_grpc_service = 13;
-
- // Enables the Zipkin exporter if set to true. The url and service name must
- // also be set.
- bool zipkin_exporter_enabled = 5;
-
- // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
- string zipkin_url = 6;
-
- // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
- // ocagent_grpc_service must also be set.
- bool ocagent_exporter_enabled = 11;
-
- // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
- // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
- // [#comment:TODO: deprecate this field]
- string ocagent_address = 12;
-
- // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
- // This is only used if the ocagent_address is left empty.
- core.v4alpha.GrpcService ocagent_grpc_service = 14;
-
- // List of incoming trace context headers we will accept. First one found
- // wins.
- repeated TraceContext incoming_trace_context = 8;
-
- // List of outgoing trace context headers we will produce.
- repeated TraceContext outgoing_trace_context = 9;
-}
-
-// Configuration structure.
-message TraceServiceConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.TraceServiceConfig";
-
- // The upstream gRPC cluster that hosts the metrics service.
- core.v4alpha.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
-}
diff --git a/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto b/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto
index 1fecdaea0a16..ff56066410cb 100644
--- a/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto
+++ b/api/envoy/extensions/filters/http/grpc_stats/v3/config.proto
@@ -54,6 +54,14 @@ message FilterConfig {
// `envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default`.
google.protobuf.BoolValue stats_for_all_methods = 3;
}
+
+ // If true, the filter will gather a histogram for the request time of the upstream.
+ // It works with :ref:`stats_for_all_methods
+ // `
+ // and :ref:`individual_method_stats_allowlist
+ // ` the same way
+ // request_message_count and response_message_count works.
+ bool enable_upstream_stats = 4;
}
// gRPC statistics filter state object in protobuf form.
diff --git a/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto b/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto
index 1aabe1bd4390..39fe6187f64f 100644
--- a/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto
+++ b/api/envoy/extensions/filters/http/jwt_authn/v3/config.proto
@@ -171,7 +171,8 @@ message JwtProvider {
// base64url_encoded(jwt_payload_in_JSON)
//
// If it is not specified, the payload will not be forwarded.
- string forward_payload_header = 8;
+ string forward_payload_header = 8
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}];
// If non empty, successfully verified JWT payloads will be written to StreamInfo DynamicMetadata
// in the format as: *namespace* is the jwt_authn filter name as **envoy.filters.http.jwt_authn**
@@ -218,12 +219,14 @@ message JwtHeader {
"envoy.config.filter.http.jwt_authn.v2alpha.JwtHeader";
// The HTTP header name.
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
+ string name = 1
+ [(validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}];
// The value prefix. The value format is "value_prefix"
// For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the
// end.
- string value_prefix = 2;
+ string value_prefix = 2
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
}
// Specify a required provider with audiences.
diff --git a/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto b/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
index 1fd2e82eed5f..d802ec4ce774 100644
--- a/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
+++ b/api/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
@@ -7,7 +7,7 @@ import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/protocol.proto";
import "envoy/config/route/v3/route.proto";
import "envoy/config/route/v3/scoped_route.proto";
-import "envoy/config/trace/v3/trace.proto";
+import "envoy/config/trace/v3/http_tracer.proto";
import "envoy/type/tracing/v3/custom_tag.proto";
import "envoy/type/v3/percent.proto";
diff --git a/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto b/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto
index 5a05a8531f35..975b71cc892f 100644
--- a/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto
+++ b/api/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto
@@ -7,7 +7,7 @@ import "envoy/config/core/v4alpha/config_source.proto";
import "envoy/config/core/v4alpha/protocol.proto";
import "envoy/config/route/v4alpha/route.proto";
import "envoy/config/route/v4alpha/scoped_route.proto";
-import "envoy/config/trace/v4alpha/trace.proto";
+import "envoy/config/trace/v4alpha/http_tracer.proto";
import "envoy/type/tracing/v3/custom_tag.proto";
import "envoy/type/v3/percent.proto";
diff --git a/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/BUILD b/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/BUILD
new file mode 100644
index 000000000000..1dcb37e5c342
--- /dev/null
+++ b/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/extensions/common/dynamic_forward_proxy/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto b/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto
new file mode 100644
index 000000000000..502a66893174
--- /dev/null
+++ b/api/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto
@@ -0,0 +1,37 @@
+syntax = "proto3";
+
+package envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha;
+
+import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha";
+option java_outer_classname = "SniDynamicForwardProxyProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).work_in_progress = true;
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: SNI dynamic forward proxy]
+
+// Configuration for the SNI-based dynamic forward proxy filter. See the
+// :ref:`architecture overview ` for
+// more information. Note this filter must be configured along with
+// :ref:`TLS inspector listener filter `
+// to work.
+// [#extension: envoy.filters.network.sni_dynamic_forward_proxy]
+message FilterConfig {
+ // The DNS cache configuration that the filter will attach to. Note this
+ // configuration must match that of associated :ref:`dynamic forward proxy
+ // cluster configuration
+ // `.
+ common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1
+ [(validate.rules).message = {required: true}];
+
+ oneof port_specifier {
+ // The port number to connect to the upstream.
+ uint32 port_value = 2 [(validate.rules).uint32 = {lte: 65535 gt: 0}];
+ }
+}
diff --git a/api/envoy/extensions/tracers/datadog/v4alpha/BUILD b/api/envoy/extensions/tracers/datadog/v4alpha/BUILD
new file mode 100644
index 000000000000..d58bd8a0fca4
--- /dev/null
+++ b/api/envoy/extensions/tracers/datadog/v4alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/api/envoy/extensions/tracers/datadog/v4alpha/datadog.proto b/api/envoy/extensions/tracers/datadog/v4alpha/datadog.proto
new file mode 100644
index 000000000000..94359ce837bf
--- /dev/null
+++ b/api/envoy/extensions/tracers/datadog/v4alpha/datadog.proto
@@ -0,0 +1,27 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.datadog.v4alpha;
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.datadog.v4alpha";
+option java_outer_classname = "DatadogProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Datadog tracer]
+
+// Configuration for the Datadog tracer.
+// [#extension: envoy.tracers.datadog]
+message DatadogConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.DatadogConfig";
+
+ // The cluster to use for submitting traces to the Datadog agent.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The name used for the service when traces are generated by envoy.
+ string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
+}
diff --git a/api/envoy/extensions/tracers/dynamic_ot/v4alpha/BUILD b/api/envoy/extensions/tracers/dynamic_ot/v4alpha/BUILD
new file mode 100644
index 000000000000..d58bd8a0fca4
--- /dev/null
+++ b/api/envoy/extensions/tracers/dynamic_ot/v4alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto b/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto
new file mode 100644
index 000000000000..d311304a3ddf
--- /dev/null
+++ b/api/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto
@@ -0,0 +1,33 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.dynamic_ot.v4alpha;
+
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.dynamic_ot.v4alpha";
+option java_outer_classname = "DynamicOtProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Dynamically loadable OpenTracing tracer]
+
+// DynamicOtConfig is used to dynamically load a tracer from a shared library
+// that implements the `OpenTracing dynamic loading API
+// `_.
+// [#extension: envoy.tracers.dynamic_ot]
+message DynamicOtConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.DynamicOtConfig";
+
+ // Dynamic library implementing the `OpenTracing API
+ // `_.
+ string library = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The configuration to use when creating a tracer from the given dynamic
+ // library.
+ google.protobuf.Struct config = 2;
+}
diff --git a/api/envoy/extensions/tracers/lightstep/v4alpha/BUILD b/api/envoy/extensions/tracers/lightstep/v4alpha/BUILD
new file mode 100644
index 000000000000..d58bd8a0fca4
--- /dev/null
+++ b/api/envoy/extensions/tracers/lightstep/v4alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto b/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto
new file mode 100644
index 000000000000..93ea47ba6a10
--- /dev/null
+++ b/api/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto
@@ -0,0 +1,47 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.lightstep.v4alpha;
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.lightstep.v4alpha";
+option java_outer_classname = "LightstepProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: LightStep tracer]
+
+// Configuration for the LightStep tracer.
+// [#extension: envoy.tracers.lightstep]
+message LightstepConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.LightstepConfig";
+
+ // Available propagation modes
+ enum PropagationMode {
+ // Propagate trace context in the single header x-ot-span-context.
+ ENVOY = 0;
+
+ // Propagate trace context using LightStep's native format.
+ LIGHTSTEP = 1;
+
+ // Propagate trace context using the b3 format.
+ B3 = 2;
+
+ // Propagation trace context using the w3 trace-context standard.
+ TRACE_CONTEXT = 3;
+ }
+
+ // The cluster manager cluster that hosts the LightStep collectors.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // File containing the access token to the `LightStep
+ // `_ API.
+ string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Propagation modes to use by LightStep's tracer.
+ repeated PropagationMode propagation_modes = 3
+ [(validate.rules).repeated = {items {enum {defined_only: true}}}];
+}
diff --git a/api/envoy/extensions/tracers/opencensus/v4alpha/BUILD b/api/envoy/extensions/tracers/opencensus/v4alpha/BUILD
new file mode 100644
index 000000000000..05e29893b9cf
--- /dev/null
+++ b/api/envoy/extensions/tracers/opencensus/v4alpha/BUILD
@@ -0,0 +1,14 @@
+# 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/config/core/v4alpha:pkg",
+ "//envoy/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto",
+ ],
+)
diff --git a/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto b/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto
new file mode 100644
index 000000000000..f64507b13827
--- /dev/null
+++ b/api/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto
@@ -0,0 +1,97 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.opencensus.v4alpha;
+
+import "envoy/config/core/v4alpha/grpc_service.proto";
+
+import "opencensus/proto/trace/v1/trace_config.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.opencensus.v4alpha";
+option java_outer_classname = "OpencensusProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: OpenCensus tracer]
+
+// Configuration for the OpenCensus tracer.
+// [#next-free-field: 15]
+// [#extension: envoy.tracers.opencensus]
+message OpenCensusConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.OpenCensusConfig";
+
+ enum TraceContext {
+ // No-op default, no trace context is utilized.
+ NONE = 0;
+
+ // W3C Trace-Context format "traceparent:" header.
+ TRACE_CONTEXT = 1;
+
+ // Binary "grpc-trace-bin:" header.
+ GRPC_TRACE_BIN = 2;
+
+ // "X-Cloud-Trace-Context:" header.
+ CLOUD_TRACE_CONTEXT = 3;
+
+ // X-B3-* headers.
+ B3 = 4;
+ }
+
+ reserved 7;
+
+ // Configures tracing, e.g. the sampler, max number of annotations, etc.
+ .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
+
+ // Enables the stdout exporter if set to true. This is intended for debugging
+ // purposes.
+ bool stdout_exporter_enabled = 2;
+
+ // Enables the Stackdriver exporter if set to true. The project_id must also
+ // be set.
+ bool stackdriver_exporter_enabled = 3;
+
+ // The Cloud project_id to use for Stackdriver tracing.
+ string stackdriver_project_id = 4;
+
+ // (optional) By default, the Stackdriver exporter will connect to production
+ // Stackdriver. If stackdriver_address is non-empty, it will instead connect
+ // to this address, which is in the gRPC format:
+ // https://github.com/grpc/grpc/blob/master/doc/naming.md
+ string stackdriver_address = 10;
+
+ // (optional) The gRPC server that hosts Stackdriver tracing service. Only
+ // Google gRPC is supported. If :ref:`target_uri `
+ // is not provided, the default production Stackdriver address will be used.
+ config.core.v4alpha.GrpcService stackdriver_grpc_service = 13;
+
+ // Enables the Zipkin exporter if set to true. The url and service name must
+ // also be set.
+ bool zipkin_exporter_enabled = 5;
+
+ // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
+ string zipkin_url = 6;
+
+ // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
+ // ocagent_grpc_service must also be set.
+ bool ocagent_exporter_enabled = 11;
+
+ // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
+ // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
+ // [#comment:TODO: deprecate this field]
+ string ocagent_address = 12;
+
+ // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
+ // This is only used if the ocagent_address is left empty.
+ config.core.v4alpha.GrpcService ocagent_grpc_service = 14;
+
+ // List of incoming trace context headers we will accept. First one found
+ // wins.
+ repeated TraceContext incoming_trace_context = 8;
+
+ // List of outgoing trace context headers we will produce.
+ repeated TraceContext outgoing_trace_context = 9;
+}
diff --git a/api/envoy/extensions/tracers/xray/v4alpha/BUILD b/api/envoy/extensions/tracers/xray/v4alpha/BUILD
new file mode 100644
index 000000000000..d8ce683c41d6
--- /dev/null
+++ b/api/envoy/extensions/tracers/xray/v4alpha/BUILD
@@ -0,0 +1,13 @@
+# 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/config/core/v4alpha:pkg",
+ "//envoy/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/generated_api_shadow/envoy/config/trace/v4alpha/xray.proto b/api/envoy/extensions/tracers/xray/v4alpha/xray.proto
similarity index 82%
rename from generated_api_shadow/envoy/config/trace/v4alpha/xray.proto
rename to api/envoy/extensions/tracers/xray/v4alpha/xray.proto
index 39bcebd1bad7..27a9b5407dda 100644
--- a/generated_api_shadow/envoy/config/trace/v4alpha/xray.proto
+++ b/api/envoy/extensions/tracers/xray/v4alpha/xray.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-package envoy.config.trace.v4alpha;
+package envoy.extensions.tracers.xray.v4alpha;
import "envoy/config/core/v4alpha/address.proto";
import "envoy/config/core/v4alpha/base.proto";
@@ -9,7 +9,7 @@ import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
-option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
+option java_package = "io.envoyproxy.envoy.extensions.tracers.xray.v4alpha";
option java_outer_classname = "XrayProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
@@ -22,7 +22,7 @@ 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.
- core.v4alpha.SocketAddress daemon_endpoint = 1;
+ config.core.v4alpha.SocketAddress daemon_endpoint = 1;
// The name of the X-Ray segment.
string segment_name = 2 [(validate.rules).string = {min_len: 1}];
@@ -31,5 +31,5 @@ message XRayConfig {
// For an example of the sampling rules see:
// `X-Ray SDK documentation
// `_
- core.v4alpha.DataSource sampling_rule_manifest = 3;
+ config.core.v4alpha.DataSource sampling_rule_manifest = 3;
}
diff --git a/api/envoy/extensions/tracers/zipkin/v4alpha/BUILD b/api/envoy/extensions/tracers/zipkin/v4alpha/BUILD
new file mode 100644
index 000000000000..8e8f00da8af0
--- /dev/null
+++ b/api/envoy/extensions/tracers/zipkin/v4alpha/BUILD
@@ -0,0 +1,13 @@
+# 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/annotations:pkg",
+ "//envoy/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto b/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto
new file mode 100644
index 000000000000..3abbcad2de15
--- /dev/null
+++ b/api/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto
@@ -0,0 +1,68 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.zipkin.v4alpha;
+
+import "google/protobuf/wrappers.proto";
+
+import "envoy/annotations/deprecation.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.zipkin.v4alpha";
+option java_outer_classname = "ZipkinProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Zipkin tracer]
+
+// Configuration for the Zipkin tracer.
+// [#extension: envoy.tracers.zipkin]
+// [#next-free-field: 6]
+message ZipkinConfig {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.ZipkinConfig";
+
+ // Available Zipkin collector endpoint versions.
+ enum CollectorEndpointVersion {
+ // Zipkin API v1, JSON over HTTP.
+ // [#comment: The default implementation of Zipkin client before this field is added was only v1
+ // and the way user configure this was by not explicitly specifying the version. Consequently,
+ // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
+ // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
+ // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
+ // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
+ DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0
+ [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
+
+ // Zipkin API v2, JSON over HTTP.
+ HTTP_JSON = 1;
+
+ // Zipkin API v2, protobuf over HTTP.
+ HTTP_PROTO = 2;
+
+ // [#not-implemented-hide:]
+ GRPC = 3;
+ }
+
+ // The cluster manager cluster that hosts the Zipkin collectors. Note that the
+ // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
+ // resources `.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The API endpoint of the Zipkin service where the spans will be sent. When
+ // using a standard Zipkin installation, the API endpoint is typically
+ // /api/v1/spans, which is the default value.
+ string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Determines whether a 128bit trace id will be used when creating a new
+ // trace instance. The default value is false, which will result in a 64 bit trace id being used.
+ bool trace_id_128bit = 3;
+
+ // Determines whether client and server spans will share the same span context.
+ // The default value is true.
+ google.protobuf.BoolValue shared_span_context = 4;
+
+ // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
+ // used.
+ CollectorEndpointVersion collector_endpoint_version = 5;
+}
diff --git a/api/versioning/BUILD b/api/versioning/BUILD
index 086cf1201a8a..0ffaf85a1cdd 100644
--- a/api/versioning/BUILD
+++ b/api/versioning/BUILD
@@ -97,6 +97,7 @@ proto_library(
"//envoy/extensions/filters/network/rbac/v3:pkg",
"//envoy/extensions/filters/network/redis_proxy/v3:pkg",
"//envoy/extensions/filters/network/sni_cluster/v3:pkg",
+ "//envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha:pkg",
"//envoy/extensions/filters/network/tcp_proxy/v3:pkg",
"//envoy/extensions/filters/network/thrift_proxy/filters/ratelimit/v3:pkg",
"//envoy/extensions/filters/network/thrift_proxy/v3:pkg",
diff --git a/bazel/README.md b/bazel/README.md
index 4f1512e9e171..60aa5c9eb915 100644
--- a/bazel/README.md
+++ b/bazel/README.md
@@ -6,15 +6,18 @@ It is recommended to use [Bazelisk](https://github.com/bazelbuild/bazelisk) inst
On Linux, run the following commands:
```
-sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v0.0.8/bazelisk-linux-amd64
+sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
sudo chmod +x /usr/local/bin/bazel
```
-On macOS, run the follwing command:
+On macOS, run the following command:
```
brew install bazelbuild/tap/bazelisk
```
+On Windows, download [bazelisk-windows-amd64.exe](https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-windows-amd64.exe)
+and save this binary in a directory on the PATH as `bazel.exe`.
+
If you're building from an revision of Envoy prior to August 2019, which doesn't contains a `.bazelversion` file, run `ci/run_envoy_docker.sh "bazel version"`
to find the right version of Bazel and set the version to `USE_BAZEL_VERSION` environment variable to build.
@@ -94,6 +97,37 @@ for how to update or override dependencies.
version of `ar` on the PATH, so if you run into issues building third party code like luajit
consider uninstalling binutils.
+ On Windows, additional dependencies are required:
+
+ Install the [MSYS2 shell](https://msys2.github.io/) and install the `diffutils`, `patch`,
+ `unzip`, and `zip` packages using `pacman`. Set the `BAZEL_SH` environment variable to the path
+ of the installed MSYS2 `bash.exe` executable. Setting the `MSYS2_ARG_CONV_EXCL` environment
+ variable to a value of `*` is often advisable to ensure argument parsing in the MSYS2 shell
+ behaves as expected.
+
+ `Git` is required. The version installable via MSYS2 is sufficient.
+
+ Install the Windows-native [python3](https://www.python.org/downloads/), the POSIX flavor
+ available via MSYS2 will not work.
+
+ For building with MSVC (the `msvc-cl` config option), you must install at least the VC++
+ workload from the
+ [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019).
+ You may also download Visual Studio 2019 and use the Build Tools packaged with that
+ installation. Earlier versions of VC++ Build Tools/Visual Studio are not recommended at this
+ time. If installed in a non-standard filesystem location, be sure to set the `BAZEL_VC`
+ environment variable to the path of the VC++ package to allow Bazel to find your installation
+ of VC++. Use caution to ensure the `link.exe` that resolves on your PATH is from VC++ Build Tools and
+ not MSYS2.
+
+ Ensure `CMake` and `ninja` binaries are on the PATH. The versions packaged with VC++ Build
+ Tools are sufficient.
+
+ In addition, because of the behavior of the `rules_foreign_cc` component of Bazel, set the
+ `TMPDIR` environment variable to a path usable as a temporary directory (e.g.
+ `C:\Windows\TEMP`). This variable is used frequently by `mktemp` from MSYS2 in the Envoy Bazel
+ build and can cause problems if not set to a value outside the MSYS2 filesystem.
+
1. Install Golang on your machine. This is required as part of building [BoringSSL](https://boringssl.googlesource.com/boringssl/+/HEAD/BUILDING.md)
and also for [Buildifer](https://github.com/bazelbuild/buildtools) which is used for formatting bazel BUILD files.
1. `go get -u github.com/bazelbuild/buildtools/buildifier` to install buildifier. You may need to set `BUILDIFIER_BIN` to `$GOPATH/bin/buildifier`
@@ -652,7 +686,7 @@ that the Go toolchain can find the necessary dependencies):
go run github.com/buchgr/bazel-remote --dir ${HOME}/bazel_cache --host 127.0.0.1 --port 28080 --max_size 64
```
-See [Bazel remote cache](github.com/buchgr/bazel-remote) for more information on the parameters.
+See [Bazel remote cache](https://github.com/buchgr/bazel-remote) for more information on the parameters.
The command above will setup a maximum 64 GiB cache at `~/bazel_cache` on port 28080. You might
want to setup a larger cache if you run ASAN builds.
diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl
index d89b139ee5f8..58a5c8878608 100644
--- a/bazel/repository_locations.bzl
+++ b/bazel/repository_locations.bzl
@@ -9,11 +9,11 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.19.1/bazel-gazelle-v0.19.1.tar.gz"],
),
bazel_toolchains = dict(
- sha256 = "1342f84d4324987f63307eb6a5aac2dff6d27967860a129f5cd40f8f9b6fd7dd",
- strip_prefix = "bazel-toolchains-2.2.0",
+ sha256 = "239a1a673861eabf988e9804f45da3b94da28d1aff05c373b013193c315d9d9e",
+ strip_prefix = "bazel-toolchains-3.0.1",
urls = [
- "https://github.com/bazelbuild/bazel-toolchains/releases/download/2.2.0/bazel-toolchains-2.2.0.tar.gz",
- "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/2.2.0.tar.gz",
+ "https://github.com/bazelbuild/bazel-toolchains/releases/download/3.0.1/bazel-toolchains-3.0.1.tar.gz",
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/3.0.1.tar.gz",
],
),
build_bazel_rules_apple = dict(
@@ -21,10 +21,10 @@ REPOSITORY_LOCATIONS = dict(
urls = ["https://github.com/bazelbuild/rules_apple/releases/download/0.19.0/rules_apple.0.19.0.tar.gz"],
),
envoy_build_tools = dict(
- sha256 = "c4193e6ab0c93db3e519dc8aeaf588e3dc414620063e00003150f64f03ad1f3f",
- strip_prefix = "envoy-build-tools-84ca08de00eedd0ba08e7d5551108d6f03f5d362",
- # 2020-03-24
- urls = ["https://github.com/envoyproxy/envoy-build-tools/archive/84ca08de00eedd0ba08e7d5551108d6f03f5d362.tar.gz"],
+ sha256 = "9d348f92ae8fb2495393109aac28aea314ad1fb013cdec1ab7b1224f804be1b7",
+ strip_prefix = "envoy-build-tools-823c2e9386eee5117f7ef9e3d7c90e784cd0d047",
+ # 2020-04-07
+ urls = ["https://github.com/envoyproxy/envoy-build-tools/archive/823c2e9386eee5117f7ef9e3d7c90e784cd0d047.tar.gz"],
),
boringssl = dict(
sha256 = "a3d4de4f03cb321ef943678d72a045c9a19d26b23d6f4e313f97600c65201a27",
diff --git a/ci/do_circle_ci.sh b/ci/do_circle_ci.sh
index 9493ce1a51b6..036a75b1b8cb 100755
--- a/ci/do_circle_ci.sh
+++ b/ci/do_circle_ci.sh
@@ -16,7 +16,7 @@ export ENVOY_SRCDIR="$(pwd)"
# xlarge resource_class.
# See note: https://circleci.com/docs/2.0/configuration-reference/#resource_class for why we
# hard code this (basically due to how docker works).
-export NUM_CPUS=8
+export NUM_CPUS=6
# CircleCI doesn't support IPv6 by default, so we run all tests with IPv4 only.
# IPv6 tests are run with Azure Pipelines.
diff --git a/ci/envoy_build_sha.sh b/ci/envoy_build_sha.sh
index 0a81b9fe8d35..6ea4600faeef 100644
--- a/ci/envoy_build_sha.sh
+++ b/ci/envoy_build_sha.sh
@@ -1,2 +1,2 @@
-ENVOY_BUILD_SHA=$(grep envoyproxy/envoy-build-ubuntu@sha256 $(dirname $0)/../.bazelrc | sed -e 's#.*envoyproxy/envoy-build-ubuntu@sha256:\(.*\)#\1#' | uniq)
+ENVOY_BUILD_SHA=$(grep envoyproxy/envoy-build-ubuntu $(dirname $0)/../.bazelrc | sed -e 's#.*envoyproxy/envoy-build-ubuntu:\(.*\)#\1#' | uniq)
[[ $(wc -l <<< "${ENVOY_BUILD_SHA}" | awk '{$1=$1};1') == 1 ]] || (echo ".bazelrc envoyproxy/envoy-build-ubuntu hashes are inconsistent!" && exit 1)
diff --git a/ci/mac_ci_steps.sh b/ci/mac_ci_steps.sh
index 552f9d7957ad..41e01d0fd134 100755
--- a/ci/mac_ci_steps.sh
+++ b/ci/mac_ci_steps.sh
@@ -26,10 +26,10 @@ BAZEL_BUILD_OPTIONS="--curses=no --show_task_finish --verbose_failures \
if [[ $# -gt 0 ]]; then
TEST_TARGETS=$*
else
- TEST_TARGETS=//test/...
+ TEST_TARGETS=//test/integration/...
fi
-if [[ "$TEST_TARGETS" == "//test/..." ]]; then
+if [[ "$TEST_TARGETS" == "//test/..." || "$TEST_TARGETS" == "//test/integration/..." ]]; then
bazel build ${BAZEL_BUILD_OPTIONS} //source/exe:envoy-static
fi
bazel test ${BAZEL_BUILD_OPTIONS} ${TEST_TARGETS}
diff --git a/ci/run_envoy_docker.sh b/ci/run_envoy_docker.sh
index 615ddcd045ea..3ac8671d5b2d 100755
--- a/ci/run_envoy_docker.sh
+++ b/ci/run_envoy_docker.sh
@@ -10,7 +10,7 @@ set -e
USER=root
USER_GROUP=root
-[[ -z "${IMAGE_NAME}" ]] && IMAGE_NAME="envoyproxy/envoy-build-ubuntu@sha256"
+[[ -z "${IMAGE_NAME}" ]] && IMAGE_NAME="envoyproxy/envoy-build-ubuntu"
# The IMAGE_ID defaults to the CI hash but can be set to an arbitrary image ID (found with 'docker
# images').
[[ -z "${IMAGE_ID}" ]] && IMAGE_ID="${ENVOY_BUILD_SHA}"
diff --git a/docs/requirements.txt b/docs/requirements.txt
index 003a06ab5257..683f5c59b938 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,4 +1,4 @@
-GitPython==3.0.0
+GitPython==3.1.1
Jinja2==2.10.3
MarkupSafe==1.1.1
Pygments==2.4.2
diff --git a/docs/root/api-v2/bootstrap/bootstrap.rst b/docs/root/api-v2/bootstrap/bootstrap.rst
index 5208ac7f89a6..228d8a6019c8 100644
--- a/docs/root/api-v2/bootstrap/bootstrap.rst
+++ b/docs/root/api-v2/bootstrap/bootstrap.rst
@@ -10,4 +10,3 @@ Bootstrap
../config/metrics/v2/metrics_service.proto
../config/overload/v2alpha/overload.proto
../config/ratelimit/v2/rls.proto
- tracing/tracing.rst
diff --git a/docs/root/api-v2/bootstrap/tracing/tracing.rst b/docs/root/api-v2/bootstrap/tracing/tracing.rst
deleted file mode 100644
index 04541081dc52..000000000000
--- a/docs/root/api-v2/bootstrap/tracing/tracing.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-Tracing
-=======
-
-.. toctree::
- :glob:
- :maxdepth: 2
-
- ../../config/trace/v2/trace.proto
- ../../config/trace/v2alpha/xray.proto
diff --git a/docs/root/api-v2/config/config.rst b/docs/root/api-v2/config/config.rst
index 096a652fb7d1..feaa9c5b0c9a 100644
--- a/docs/root/api-v2/config/config.rst
+++ b/docs/root/api-v2/config/config.rst
@@ -16,4 +16,5 @@ Extensions
listener/listener
grpc_credential/grpc_credential
retry/retry
+ trace/trace
wasm/wasm
diff --git a/docs/root/api-v2/config/trace/trace.rst b/docs/root/api-v2/config/trace/trace.rst
new file mode 100644
index 000000000000..80f06cc5c349
--- /dev/null
+++ b/docs/root/api-v2/config/trace/trace.rst
@@ -0,0 +1,9 @@
+HTTP Tracers
+==============
+
+.. toctree::
+ :glob:
+ :maxdepth: 2
+
+ v2/*
+ v2alpha/*
diff --git a/docs/root/api-v3/bootstrap/bootstrap.rst b/docs/root/api-v3/bootstrap/bootstrap.rst
index bbaf343a20ab..d2397a9bf2ac 100644
--- a/docs/root/api-v3/bootstrap/bootstrap.rst
+++ b/docs/root/api-v3/bootstrap/bootstrap.rst
@@ -10,4 +10,3 @@ Bootstrap
../config/metrics/v3/metrics_service.proto
../config/overload/v3/overload.proto
../config/ratelimit/v3/rls.proto
- tracing/tracing.rst
diff --git a/docs/root/api-v3/bootstrap/tracing/tracing.rst b/docs/root/api-v3/bootstrap/tracing/tracing.rst
deleted file mode 100644
index abc9e78169f7..000000000000
--- a/docs/root/api-v3/bootstrap/tracing/tracing.rst
+++ /dev/null
@@ -1,9 +0,0 @@
-Tracing
-=======
-
-.. toctree::
- :glob:
- :maxdepth: 2
-
- ../../config/trace/v3/trace.proto
- ../../config/trace/v3/xray.proto
diff --git a/docs/root/api-v3/config/config.rst b/docs/root/api-v3/config/config.rst
index 3725a558c7c8..d7e6e6edd43c 100644
--- a/docs/root/api-v3/config/config.rst
+++ b/docs/root/api-v3/config/config.rst
@@ -15,3 +15,4 @@ Extensions
cluster/cluster
grpc_credential/grpc_credential
retry/retry
+ trace/trace
diff --git a/docs/root/api-v3/config/trace/trace.rst b/docs/root/api-v3/config/trace/trace.rst
new file mode 100644
index 000000000000..94f834998f3b
--- /dev/null
+++ b/docs/root/api-v3/config/trace/trace.rst
@@ -0,0 +1,8 @@
+HTTP Tracers
+==============
+
+.. toctree::
+ :glob:
+ :maxdepth: 2
+
+ v3/*
diff --git a/docs/root/configuration/http/http_filters/fault_filter.rst b/docs/root/configuration/http/http_filters/fault_filter.rst
index 7b0bc9b83a12..80678714db69 100644
--- a/docs/root/configuration/http/http_filters/fault_filter.rst
+++ b/docs/root/configuration/http/http_filters/fault_filter.rst
@@ -36,19 +36,58 @@ The fault filter has the capability to allow fault configuration to be specified
This is useful in certain scenarios in which it is desired to allow the client to specify its own
fault configuration. The currently supported header controls are:
-* Request abort configuration via the *x-envoy-fault-abort-request* header. The header value
- should be an integer that specifies the HTTP status code to return in response to a request
- and must be in the range [200, 600). In order for the header to work, :ref:`header_abort
+x-envoy-fault-abort-request
+ HTTP status code to abort a request with. The header value should be an integer that specifies
+ the HTTP status code to return in response to a request and must be in the range [200, 600).
+ In order for the header to work, :ref:`header_abort
` needs to be set.
-* Request delay configuration via the *x-envoy-fault-delay-request* header. The header value
- should be an integer that specifies the number of milliseconds to throttle the latency for.
- In order for the header to work, :ref:`header_delay
+
+x-envoy-fault-abort-request-percentage
+ The percentage of requests that should be failed with a status code that's defined
+ by the value of *x-envoy-fault-abort-request* HTTP header. The header value should be an integer
+ that specifies the numerator of the percentage of request to apply aborts to and must be greater
+ or equal to 0 and its maximum value is capped by the value of the numerator of
+ :ref:`percentage ` field.
+ Percentage's denominator is equal to default percentage's denominator
+ :ref:`percentage ` field.
+ In order for the header to work, :ref:`header_abort
+ ` needs to be set and
+ *x-envoy-fault-abort-request* HTTP header needs to be a part of a request.
+
+x-envoy-fault-delay-request
+ The duration to delay a request by. The header value should be an integer that specifies the number
+ of milliseconds to throttle the latency for. In order for the header to work, :ref:`header_delay
` needs to be set.
-* Response rate limit configuration via the *x-envoy-fault-throughput-response* header. The
- header value should be an integer that specifies the limit in KiB/s and must be > 0. In order
- for the header to work, :ref:`header_limit
+
+x-envoy-fault-delay-request-percentage
+ The percentage of requests that should be delayed by a duration that's defined by the value of
+ *x-envoy-fault-delay-request* HTTP header. The header value should be an integer that
+ specifies the percentage of request to apply delays to and must be greater
+ or equal to 0 and its maximum value is capped by the value of the numerator of
+ :ref:`percentage ` field.
+ Percentage's denominator is equal to default percentage's denominator
+ :ref:`percentage ` field.
+ In order for the header to work, :ref:`header_delay
+ ` needs to be set and
+ *x-envoy-fault-delay-request* HTTP header needs to be a part of a request.
+
+x-envoy-fault-throughput-response
+ The rate limit to use when a response to a caller is sent. The header value should be an integer
+ that specifies the limit in KiB/s and must be > 0. In order for the header to work, :ref:`header_limit
` needs to be set.
+x-envoy-fault-throughput-response-percentage
+ The percentage of requests whose response rate should be limited to the value of
+ *x-envoy-fault-throughput-response* HTTP header. The header value should be an integer that
+ specifies the percentage of request to apply delays to and must be greater
+ or equal to 0 and its maximum value is capped by the value of the numerator of
+ :ref:`percentage ` field.
+ Percentage's denominator is equal to default percentage's denominator
+ :ref:`percentage ` field.
+ In order for the header to work, :ref:`header_limit
+ ` needs to be set and
+ *x-envoy-fault-delay-request* HTTP header needs to be a part of a request.
+
.. attention::
Allowing header control is inherently dangerous if exposed to untrusted clients. In this case,
@@ -98,7 +137,7 @@ fault.http.abort.abort_percent
`.
fault.http.abort.http_status
- HTTP status code that will be used as the of requests that will be
+ HTTP status code that will be used as the response status code of requests that will be
aborted if the headers match. Defaults to the HTTP status code specified
in the config. If the config does not contain an *abort* block, then
*http_status* defaults to 0. For historic reasons, this runtime key is
diff --git a/docs/root/configuration/http/http_filters/grpc_json_transcoder_filter.rst b/docs/root/configuration/http/http_filters/grpc_json_transcoder_filter.rst
index b4077984c62e..a1fdfdcccdf5 100644
--- a/docs/root/configuration/http/http_filters/grpc_json_transcoder_filter.rst
+++ b/docs/root/configuration/http/http_filters/grpc_json_transcoder_filter.rst
@@ -82,7 +82,10 @@ as its output message type. The implementation needs to set
(which sets the value of the HTTP response `Content-Type` header) and
`data `_
(which sets the HTTP response body) accordingly.
-
+Multiple `google.api.HttpBody `_
+can be send by the gRPC server in the server streaming case.
+In this case, HTTP response header `Content-Type` will use the `content-type` from the first
+`google.api.HttpBody `.
Sample Envoy configuration
--------------------------
diff --git a/docs/root/configuration/http/http_filters/grpc_stats_filter.rst b/docs/root/configuration/http/http_filters/grpc_stats_filter.rst
index 78ab88624dff..984a2f9348d7 100644
--- a/docs/root/configuration/http/http_filters/grpc_stats_filter.rst
+++ b/docs/root/configuration/http/http_filters/grpc_stats_filter.rst
@@ -21,6 +21,8 @@ are shown in this form. See the documentation for
:ref:`individual_method_stats_allowlist `
and :ref:`stats_for_all_methods `.
+To enable *upstream_rq_time* (v3 API only) see :ref:`enable_upstream_stats `.
+
.. csv-table::
:header: Name, Type, Description
@@ -31,3 +33,4 @@ and :ref:`stats_for_all_methods ..total, Counter, Total service/method calls
..request_message_count, Counter, Total request message count for service/method calls
..response_message_count, Counter, Total response message count for service/method calls
+ ..upstream_rq_time, Histogram, Request time milliseconds
diff --git a/docs/root/configuration/http/http_filters/header_to_metadata_filter.rst b/docs/root/configuration/http/http_filters/header_to_metadata_filter.rst
index 73ddc9a1f493..38a55736861e 100644
--- a/docs/root/configuration/http/http_filters/header_to_metadata_filter.rst
+++ b/docs/root/configuration/http/http_filters/header_to_metadata_filter.rst
@@ -60,6 +60,33 @@ This would then allow requests with the `x-version` header set to be matched aga
endpoints with the corresponding version. Whereas requests with that header missing
would be matched with the default endpoints.
+Note that this filter also supports per route configuration:
+
+.. code-block:: yaml
+
+ route_config:
+ name: local_route
+ virtual_hosts:
+ - name: local_service
+ domains: ["*"]
+ routes:
+ - match: { prefix: "/version-to-metadata" }
+ route: { cluster: service }
+ per_filter_config:
+ envoy.filters.http.header_to_metadata:
+ request_rules:
+ - header: x-version
+ on_header_present:
+ metadata_namespace: envoy.lb
+ key: version
+ type: STRING
+ remove: false
+ - match: { prefix: "/" }
+ route: { cluster: some_service }
+
+This can be used to either override the global configuration or if the global configuration
+is empty (no rules), it can be used to only enable the filter at a per route level.
+
Statistics
----------
diff --git a/docs/root/configuration/http/http_filters/rate_limit_filter.rst b/docs/root/configuration/http/http_filters/rate_limit_filter.rst
index 7a88facc199b..e76dda3d6f02 100644
--- a/docs/root/configuration/http/http_filters/rate_limit_filter.rst
+++ b/docs/root/configuration/http/http_filters/rate_limit_filter.rst
@@ -101,7 +101,7 @@ ratelimit.http_filter_enabled
% of requests that will call the rate limit service. Defaults to 100.
ratelimit.http_filter_enforcing
- % of requests that will call the rate limit service and enforce the decision. Defaults to 100.
+ % of requests that that will have the rate limit service decision enforced. Defaults to 100.
This can be used to test what would happen before fully enforcing the outcome.
ratelimit..http_filter_enabled
diff --git a/docs/root/configuration/http/http_filters/router_filter.rst b/docs/root/configuration/http/http_filters/router_filter.rst
index d1a5d17f1a40..6575e0ed2336 100644
--- a/docs/root/configuration/http/http_filters/router_filter.rst
+++ b/docs/root/configuration/http/http_filters/router_filter.rst
@@ -388,7 +388,6 @@ owning HTTP connection manager.
rq_direct_response, Counter, Total requests that resulted in a direct response
rq_total, Counter, Total routed requests
rq_reset_after_downstream_response_started, Counter, Total requests that were reset after downstream response had started
- rq_retry_skipped_request_not_complete, Counter, Total retries that were skipped as the request is not yet complete
.. _config_http_filters_router_vcluster_stats:
diff --git a/docs/root/configuration/listeners/network_filters/network_filters.rst b/docs/root/configuration/listeners/network_filters/network_filters.rst
index 9e75675316a5..65511250f84b 100644
--- a/docs/root/configuration/listeners/network_filters/network_filters.rst
+++ b/docs/root/configuration/listeners/network_filters/network_filters.rst
@@ -26,4 +26,5 @@ filters.
tcp_proxy_filter
thrift_proxy_filter
sni_cluster_filter
+ sni_dynamic_forward_proxy_filter
zookeeper_proxy_filter
diff --git a/docs/root/configuration/listeners/network_filters/sni_dynamic_forward_proxy_filter.rst b/docs/root/configuration/listeners/network_filters/sni_dynamic_forward_proxy_filter.rst
new file mode 100644
index 000000000000..4751b3a614e5
--- /dev/null
+++ b/docs/root/configuration/listeners/network_filters/sni_dynamic_forward_proxy_filter.rst
@@ -0,0 +1,72 @@
+.. _config_network_filters_sni_dynamic_forward_proxy:
+
+SNI dynamic forward proxy
+=========================
+
+.. attention::
+
+ SNI dynamic forward proxy support should be considered alpha and not production ready.
+
+Through the combination of :ref:`TLS inspector ` listener filter,
+this network filter and the
+:ref:`dynamic forward proxy cluster `,
+Envoy supports SNI based dynamic forward proxy. The implementation works just like the
+:ref:`HTTP dynamic forward proxy `, but using the value in
+SNI as target host instead.
+
+The following is a complete configuration that configures both this filter
+as well as the :ref:`dynamic forward proxy cluster
+`. Both filter and cluster
+must be configured together and point to the same DNS cache parameters for Envoy to operate as an
+SNI dynamic forward proxy.
+
+.. note::
+
+ The following config doesn't terminate TLS in listener, so there is no need to configure TLS context
+ in cluster. The TLS handshake is passed through by Envoy.
+
+.. code-block:: yaml
+
+ admin:
+ access_log_path: /tmp/admin_access.log
+ address:
+ socket_address:
+ protocol: TCP
+ address: 127.0.0.1
+ port_value: 9901
+ static_resources:
+ listeners:
+ - name: listener_0
+ address:
+ socket_address:
+ protocol: TCP
+ address: 0.0.0.0
+ port_value: 10000
+ listener_filters:
+ - name: envoy.filters.listener.tls_inspector
+ filter_chains:
+ - filters:
+ - name: envoy.filters.network.sni_dynamic_forward_proxy
+ typed_config:
+ "@type": type.googleapis.com/envoy.config.filter.network.sni_dynamic_forward_proxy.v2alpha.FilterConfig
+ port_value: 443
+ dns_cache_config:
+ name: dynamic_forward_proxy_cache_config
+ dns_lookup_family: V4_ONLY
+ - name: envoy.tcp_proxy
+ typed_config:
+ "@type": type.googleapis.com/envoy.config.filter.network.tcp_proxy.v2.TcpProxy
+ stat_prefix: tcp
+ cluster: dynamic_forward_proxy_cluster
+ clusters:
+ - name: dynamic_forward_proxy_cluster
+ connect_timeout: 1s
+ lb_policy: CLUSTER_PROVIDED
+ cluster_type:
+ name: envoy.clusters.dynamic_forward_proxy
+ typed_config:
+ "@type": type.googleapis.com/envoy.config.cluster.dynamic_forward_proxy.v2alpha.ClusterConfig
+ dns_cache_config:
+ name: dynamic_forward_proxy_cache_config
+ dns_lookup_family: V4_ONLY
+
diff --git a/docs/root/configuration/observability/access_log.rst b/docs/root/configuration/observability/access_log.rst
index 21eec6fd1bfe..46637c05ec4b 100644
--- a/docs/root/configuration/observability/access_log.rst
+++ b/docs/root/configuration/observability/access_log.rst
@@ -410,12 +410,17 @@ The following command operators are supported:
JSON struct or list is rendered. Structs and lists may be nested. In any event, the maximum
length is ignored
-%FILTER_STATE(KEY):Z%
+.. _config_access_log_format_filter_state:
+
+%FILTER_STATE(KEY:F):Z%
HTTP
:ref:`Filter State ` info, where the KEY is required to
look up the filter state object. The serialized proto will be logged as JSON string if possible.
If the serialized proto is unknown to Envoy it will be logged as protobuf debug string.
Z is an optional parameter denoting string truncation up to Z characters long.
+ F is an optional parameter used to indicate which method FilterState uses for serialization.
+ If 'PLAIN' is set, the filter state object will be serialized as an unstructured string.
+ If 'TYPED' is set or no F provided, the filter state object will be serialized as an JSON string.
TCP
Same as HTTP, the filter state is from connection instead of a L7 request.
diff --git a/docs/root/install/building.rst b/docs/root/install/building.rst
index 9541bc6316bd..ada695fa53b5 100644
--- a/docs/root/install/building.rst
+++ b/docs/root/install/building.rst
@@ -41,13 +41,10 @@ be found in the following repositories:
* `envoyproxy/envoy-alpine-debug `_:
Release binary with debug symbols on top of a **glibc** alpine base.
-In the above repositories, the *latest* tag points to the latest official release.
-
.. note::
- The above repositories used to contain the dev images described below. They remain to avoid
- breaking existing users. New dev images are added to the repositories described in the following
- section.
+ In the above repositories, we do **not** tag a *latest* image. As we now do security/stable
+ releases, *latest* has no good meaning and users should pin to a specific tag.
On every master commit we additionally create a set of development Docker images. These images can
be found in the following repositories:
diff --git a/docs/root/version_history/current.rst b/docs/root/version_history/current.rst
index dfc14eb93609..662f014a72d2 100644
--- a/docs/root/version_history/current.rst
+++ b/docs/root/version_history/current.rst
@@ -5,9 +5,18 @@ Changes
-------
* access loggers: added GRPC_STATUS operator on logging format.
+* access loggers: extened specifier for FilterStateFormatter to output :ref:`unstructured log string `.
+* dynamic forward proxy: added :ref:`SNI based dynamic forward proxy ` support.
+* fault: added support for controlling the percentage of requests that abort, delay and response rate limits faults
+ are applied to using :ref:`HTTP headers ` to the HTTP fault filter.
+* filter: add `upstram_rq_time` stats to the GPRC stats filter.
+ Disabled by default and can be enabled via :ref:`enable_upstream_stats `.
+* grpc-json: added support for streaming response using
+ `google.api.HttpBody `_.
* http: fixed a bug where the upgrade header was not cleared on responses to non-upgrade requests.
Can be reverted temporarily by setting runtime feature `envoy.reloadable_features.fix_upgrade_response` to false.
* network filters: added a :ref:`postgres proxy filter `.
+* router: allow retries of streaming or incomplete requests. This removes stat `rq_retry_skipped_request_not_complete`.
* tracing: tracing configuration has been made fully dynamic and every HTTP connection manager
can now have a separate :ref:`tracing provider `.
diff --git a/generated_api_shadow/envoy/config/bootstrap/v2/bootstrap.proto b/generated_api_shadow/envoy/config/bootstrap/v2/bootstrap.proto
index 0942c78bd4ab..622304483eb2 100644
--- a/generated_api_shadow/envoy/config/bootstrap/v2/bootstrap.proto
+++ b/generated_api_shadow/envoy/config/bootstrap/v2/bootstrap.proto
@@ -12,7 +12,7 @@ import "envoy/api/v2/core/socket_option.proto";
import "envoy/api/v2/listener.proto";
import "envoy/config/metrics/v2/stats.proto";
import "envoy/config/overload/v2alpha/overload.proto";
-import "envoy/config/trace/v2/trace.proto";
+import "envoy/config/trace/v2/http_tracer.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/struct.proto";
diff --git a/generated_api_shadow/envoy/config/bootstrap/v3/bootstrap.proto b/generated_api_shadow/envoy/config/bootstrap/v3/bootstrap.proto
index 04d714065f9f..3b0861d81850 100644
--- a/generated_api_shadow/envoy/config/bootstrap/v3/bootstrap.proto
+++ b/generated_api_shadow/envoy/config/bootstrap/v3/bootstrap.proto
@@ -11,7 +11,7 @@ import "envoy/config/core/v3/socket_option.proto";
import "envoy/config/listener/v3/listener.proto";
import "envoy/config/metrics/v3/stats.proto";
import "envoy/config/overload/v3/overload.proto";
-import "envoy/config/trace/v3/trace.proto";
+import "envoy/config/trace/v3/http_tracer.proto";
import "envoy/extensions/transport_sockets/tls/v3/cert.proto";
import "google/protobuf/duration.proto";
diff --git a/generated_api_shadow/envoy/config/bootstrap/v4alpha/bootstrap.proto b/generated_api_shadow/envoy/config/bootstrap/v4alpha/bootstrap.proto
index f8ada24bf2e2..9177f186f6b5 100644
--- a/generated_api_shadow/envoy/config/bootstrap/v4alpha/bootstrap.proto
+++ b/generated_api_shadow/envoy/config/bootstrap/v4alpha/bootstrap.proto
@@ -11,7 +11,7 @@ import "envoy/config/core/v4alpha/socket_option.proto";
import "envoy/config/listener/v3/listener.proto";
import "envoy/config/metrics/v3/stats.proto";
import "envoy/config/overload/v3/overload.proto";
-import "envoy/config/trace/v4alpha/trace.proto";
+import "envoy/config/trace/v4alpha/http_tracer.proto";
import "envoy/extensions/transport_sockets/tls/v4alpha/cert.proto";
import "google/protobuf/duration.proto";
diff --git a/generated_api_shadow/envoy/config/core/v3/health_check.proto b/generated_api_shadow/envoy/config/core/v3/health_check.proto
index 2ed3b69eaa4f..5b95ebe39de3 100644
--- a/generated_api_shadow/envoy/config/core/v3/health_check.proto
+++ b/generated_api_shadow/envoy/config/core/v3/health_check.proto
@@ -83,11 +83,13 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The host header can be customized for a specific endpoint by setting the
// :ref:`hostname ` field.
- string host = 1;
+ string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
// Specifies the HTTP path that will be requested during health checking. For example
// */healthcheck*.
- string path = 2 [(validate.rules).string = {min_bytes: 1}];
+ string path = 2 [
+ (validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}
+ ];
// [#not-implemented-hide:] HTTP specific payload.
Payload send = 3;
@@ -104,7 +106,9 @@ message HealthCheck {
// Specifies a list of HTTP headers that should be removed from each request that is sent to the
// health checked cluster.
- repeated string request_headers_to_remove = 8;
+ repeated string request_headers_to_remove = 8 [(validate.rules).repeated = {
+ items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP response statuses considered healthy. If provided, replaces default
// 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open
@@ -170,7 +174,8 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The authority header can be customized for a specific endpoint by setting
// the :ref:`hostname ` field.
- string authority = 2;
+ string authority = 2
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
}
// Custom health check.
diff --git a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto
index 0e6c4e73c2a2..1975c309a7de 100644
--- a/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto
+++ b/generated_api_shadow/envoy/config/core/v4alpha/health_check.proto
@@ -87,11 +87,13 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The host header can be customized for a specific endpoint by setting the
// :ref:`hostname ` field.
- string host = 1;
+ string host = 1 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
// Specifies the HTTP path that will be requested during health checking. For example
// */healthcheck*.
- string path = 2 [(validate.rules).string = {min_bytes: 1}];
+ string path = 2 [
+ (validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_VALUE strict: false}
+ ];
// [#not-implemented-hide:] HTTP specific payload.
Payload send = 3;
@@ -108,7 +110,9 @@ message HealthCheck {
// Specifies a list of HTTP headers that should be removed from each request that is sent to the
// health checked cluster.
- repeated string request_headers_to_remove = 8;
+ repeated string request_headers_to_remove = 8 [(validate.rules).repeated = {
+ items {string {well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP response statuses considered healthy. If provided, replaces default
// 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open
@@ -169,7 +173,8 @@ message HealthCheck {
// left empty (default value), the name of the cluster this health check is associated
// with will be used. The authority header can be customized for a specific endpoint by setting
// the :ref:`hostname ` field.
- string authority = 2;
+ string authority = 2
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
}
// Custom health check.
diff --git a/generated_api_shadow/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto b/generated_api_shadow/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
index f760c25dcde3..c78e69b2ae30 100644
--- a/generated_api_shadow/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
+++ b/generated_api_shadow/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto
@@ -7,7 +7,7 @@ import "envoy/api/v2/core/protocol.proto";
import "envoy/api/v2/route.proto";
import "envoy/api/v2/scoped_route.proto";
import "envoy/config/filter/accesslog/v2/accesslog.proto";
-import "envoy/config/trace/v2/trace.proto";
+import "envoy/config/trace/v2/http_tracer.proto";
import "envoy/type/percent.proto";
import "envoy/type/tracing/v2/custom_tag.proto";
diff --git a/generated_api_shadow/envoy/config/route/v3/route_components.proto b/generated_api_shadow/envoy/config/route/v3/route_components.proto
index 8ef58ba20798..616e76af302e 100644
--- a/generated_api_shadow/envoy/config/route/v3/route_components.proto
+++ b/generated_api_shadow/envoy/config/route/v3/route_components.proto
@@ -106,7 +106,9 @@ message VirtualHost {
// Specifies a list of HTTP headers that should be removed from each request
// handled by this virtual host.
- repeated string request_headers_to_remove = 13;
+ repeated string request_headers_to_remove = 13 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP headers that should be added to each response
// handled by this virtual host. Headers specified at this level are applied
@@ -225,7 +227,9 @@ message Route {
// The metadata should go under the filter namespace that will need it.
// For instance, if the metadata is intended for the Router filter,
// the filter name should be specified as *envoy.filters.http.router*.
- repeated string request_headers_to_remove = 12;
+ repeated string request_headers_to_remove = 12 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Decorator for the matched route.
repeated core.v3.HeaderValueOption response_headers_to_add = 10
diff --git a/generated_api_shadow/envoy/config/route/v4alpha/route_components.proto b/generated_api_shadow/envoy/config/route/v4alpha/route_components.proto
index 33f8d64543df..e813b632edb0 100644
--- a/generated_api_shadow/envoy/config/route/v4alpha/route_components.proto
+++ b/generated_api_shadow/envoy/config/route/v4alpha/route_components.proto
@@ -108,7 +108,9 @@ message VirtualHost {
// Specifies a list of HTTP headers that should be removed from each request
// handled by this virtual host.
- repeated string request_headers_to_remove = 13;
+ repeated string request_headers_to_remove = 13 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a list of HTTP headers that should be added to each response
// handled by this virtual host. Headers specified at this level are applied
@@ -252,7 +254,9 @@ message Route {
// Specifies a list of HTTP headers that should be removed from each request
// matching this route.
- repeated string request_headers_to_remove = 12;
+ repeated string request_headers_to_remove = 12 [(validate.rules).repeated = {
+ items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}}
+ }];
// Specifies a set of headers that will be added to responses to requests
// matching this route. Headers specified at this level are applied before
diff --git a/generated_api_shadow/envoy/config/trace/v2/datadog.proto b/generated_api_shadow/envoy/config/trace/v2/datadog.proto
new file mode 100644
index 000000000000..0992601a8acc
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v2/datadog.proto
@@ -0,0 +1,23 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "DatadogProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Datadog tracer]
+
+// Configuration for the Datadog tracer.
+// [#extension: envoy.tracers.datadog]
+message DatadogConfig {
+ // The cluster to use for submitting traces to the Datadog agent.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The name used for the service when traces are generated by envoy.
+ string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
+}
diff --git a/generated_api_shadow/envoy/config/trace/v2/dynamic_ot.proto b/generated_api_shadow/envoy/config/trace/v2/dynamic_ot.proto
new file mode 100644
index 000000000000..55c6d401b335
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v2/dynamic_ot.proto
@@ -0,0 +1,29 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "DynamicOtProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Dynamically loadable OpenTracing tracer]
+
+// DynamicOtConfig is used to dynamically load a tracer from a shared library
+// that implements the `OpenTracing dynamic loading API
+// `_.
+// [#extension: envoy.tracers.dynamic_ot]
+message DynamicOtConfig {
+ // Dynamic library implementing the `OpenTracing API
+ // `_.
+ string library = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The configuration to use when creating a tracer from the given dynamic
+ // library.
+ google.protobuf.Struct config = 2;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v2/http_tracer.proto b/generated_api_shadow/envoy/config/trace/v2/http_tracer.proto
new file mode 100644
index 000000000000..fba830b987b6
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v2/http_tracer.proto
@@ -0,0 +1,65 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "HttpTracerProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Tracing]
+// Tracing :ref:`architecture overview `.
+
+// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
+//
+// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
+// supported.
+//
+// .. attention::
+//
+// Use of this message type has been deprecated in favor of direct use of
+// :ref:`Tracing.Http `.
+message Tracing {
+ // Configuration for an HTTP tracer provider used by Envoy.
+ //
+ // The configuration is defined by the
+ // :ref:`HttpConnectionManager.Tracing `
+ // :ref:`provider `
+ // field.
+ message Http {
+ // The name of the HTTP trace driver to instantiate. The name must match a
+ // supported HTTP trace driver. Built-in trace drivers:
+ //
+ // - *envoy.tracers.lightstep*
+ // - *envoy.tracers.zipkin*
+ // - *envoy.tracers.dynamic_ot*
+ // - *envoy.tracers.datadog*
+ // - *envoy.tracers.opencensus*
+ // - *envoy.tracers.xray*
+ string name = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // Trace driver specific configuration which depends on the driver being instantiated.
+ // See the trace drivers for examples:
+ //
+ // - :ref:`LightstepConfig `
+ // - :ref:`ZipkinConfig `
+ // - :ref:`DynamicOtConfig `
+ // - :ref:`DatadogConfig `
+ // - :ref:`OpenCensusConfig `
+ // - :ref:`AWS X-Ray `
+ oneof config_type {
+ google.protobuf.Struct config = 2 [deprecated = true];
+
+ google.protobuf.Any typed_config = 3;
+ }
+ }
+
+ // Provides configuration for the HTTP tracer.
+ Http http = 1;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v2/lightstep.proto b/generated_api_shadow/envoy/config/trace/v2/lightstep.proto
new file mode 100644
index 000000000000..849749baaa0d
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v2/lightstep.proto
@@ -0,0 +1,43 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "LightstepProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: LightStep tracer]
+
+// Configuration for the LightStep tracer.
+// [#extension: envoy.tracers.lightstep]
+message LightstepConfig {
+ // Available propagation modes
+ enum PropagationMode {
+ // Propagate trace context in the single header x-ot-span-context.
+ ENVOY = 0;
+
+ // Propagate trace context using LightStep's native format.
+ LIGHTSTEP = 1;
+
+ // Propagate trace context using the b3 format.
+ B3 = 2;
+
+ // Propagation trace context using the w3 trace-context standard.
+ TRACE_CONTEXT = 3;
+ }
+
+ // The cluster manager cluster that hosts the LightStep collectors.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // File containing the access token to the `LightStep
+ // `_ API.
+ string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Propagation modes to use by LightStep's tracer.
+ repeated PropagationMode propagation_modes = 3
+ [(validate.rules).repeated = {items {enum {defined_only: true}}}];
+}
diff --git a/generated_api_shadow/envoy/config/trace/v2/opencensus.proto b/generated_api_shadow/envoy/config/trace/v2/opencensus.proto
new file mode 100644
index 000000000000..8c8dab94a875
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v2/opencensus.proto
@@ -0,0 +1,93 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "envoy/api/v2/core/grpc_service.proto";
+
+import "opencensus/proto/trace/v1/trace_config.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "OpencensusProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: OpenCensus tracer]
+
+// Configuration for the OpenCensus tracer.
+// [#next-free-field: 15]
+// [#extension: envoy.tracers.opencensus]
+message OpenCensusConfig {
+ enum TraceContext {
+ // No-op default, no trace context is utilized.
+ NONE = 0;
+
+ // W3C Trace-Context format "traceparent:" header.
+ TRACE_CONTEXT = 1;
+
+ // Binary "grpc-trace-bin:" header.
+ GRPC_TRACE_BIN = 2;
+
+ // "X-Cloud-Trace-Context:" header.
+ CLOUD_TRACE_CONTEXT = 3;
+
+ // X-B3-* headers.
+ B3 = 4;
+ }
+
+ reserved 7;
+
+ // Configures tracing, e.g. the sampler, max number of annotations, etc.
+ opencensus.proto.trace.v1.TraceConfig trace_config = 1;
+
+ // Enables the stdout exporter if set to true. This is intended for debugging
+ // purposes.
+ bool stdout_exporter_enabled = 2;
+
+ // Enables the Stackdriver exporter if set to true. The project_id must also
+ // be set.
+ bool stackdriver_exporter_enabled = 3;
+
+ // The Cloud project_id to use for Stackdriver tracing.
+ string stackdriver_project_id = 4;
+
+ // (optional) By default, the Stackdriver exporter will connect to production
+ // Stackdriver. If stackdriver_address is non-empty, it will instead connect
+ // to this address, which is in the gRPC format:
+ // https://github.com/grpc/grpc/blob/master/doc/naming.md
+ string stackdriver_address = 10;
+
+ // (optional) The gRPC server that hosts Stackdriver tracing service. Only
+ // Google gRPC is supported. If :ref:`target_uri `
+ // is not provided, the default production Stackdriver address will be used.
+ api.v2.core.GrpcService stackdriver_grpc_service = 13;
+
+ // Enables the Zipkin exporter if set to true. The url and service name must
+ // also be set.
+ bool zipkin_exporter_enabled = 5;
+
+ // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
+ string zipkin_url = 6;
+
+ // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
+ // ocagent_grpc_service must also be set.
+ bool ocagent_exporter_enabled = 11;
+
+ // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
+ // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
+ // [#comment:TODO: deprecate this field]
+ string ocagent_address = 12;
+
+ // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
+ // This is only used if the ocagent_address is left empty.
+ api.v2.core.GrpcService ocagent_grpc_service = 14;
+
+ // List of incoming trace context headers we will accept. First one found
+ // wins.
+ repeated TraceContext incoming_trace_context = 8;
+
+ // List of outgoing trace context headers we will produce.
+ repeated TraceContext outgoing_trace_context = 9;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v2/service.proto b/generated_api_shadow/envoy/config/trace/v2/service.proto
new file mode 100644
index 000000000000..d102499b6261
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v2/service.proto
@@ -0,0 +1,21 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "envoy/api/v2/core/grpc_service.proto";
+
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "ServiceProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Trace Service]
+
+// Configuration structure.
+message TraceServiceConfig {
+ // The upstream gRPC cluster that hosts the metrics service.
+ api.v2.core.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
+}
diff --git a/generated_api_shadow/envoy/config/trace/v2/trace.proto b/generated_api_shadow/envoy/config/trace/v2/trace.proto
index 308a97e4eef4..9f0670b28f7a 100644
--- a/generated_api_shadow/envoy/config/trace/v2/trace.proto
+++ b/generated_api_shadow/envoy/config/trace/v2/trace.proto
@@ -2,254 +2,16 @@ syntax = "proto3";
package envoy.config.trace.v2;
-import "envoy/api/v2/core/grpc_service.proto";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/wrappers.proto";
-
-import "opencensus/proto/trace/v1/trace_config.proto";
-
-import "envoy/annotations/deprecation.proto";
import "udpa/annotations/status.proto";
-import "validate/validate.proto";
+
+import public "envoy/config/trace/v2/datadog.proto";
+import public "envoy/config/trace/v2/dynamic_ot.proto";
+import public "envoy/config/trace/v2/http_tracer.proto";
+import public "envoy/config/trace/v2/lightstep.proto";
+import public "envoy/config/trace/v2/opencensus.proto";
+import public "envoy/config/trace/v2/service.proto";
+import public "envoy/config/trace/v2/zipkin.proto";
option java_package = "io.envoyproxy.envoy.config.trace.v2";
option java_outer_classname = "TraceProto";
option java_multiple_files = true;
-option (udpa.annotations.file_status).package_version_status = FROZEN;
-
-// [#protodoc-title: Tracing]
-// Tracing :ref:`architecture overview `.
-
-// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
-//
-// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
-// supported.
-//
-// .. attention::
-//
-// Use of this message type has been deprecated in favor of direct use of
-// :ref:`Tracing.Http `.
-message Tracing {
- // Configuration for an HTTP tracer provider used by Envoy.
- //
- // The configuration is defined by the
- // :ref:`HttpConnectionManager.Tracing `
- // :ref:`provider `
- // field.
- message Http {
- // The name of the HTTP trace driver to instantiate. The name must match a
- // supported HTTP trace driver. Built-in trace drivers:
- //
- // - *envoy.tracers.lightstep*
- // - *envoy.tracers.zipkin*
- // - *envoy.tracers.dynamic_ot*
- // - *envoy.tracers.datadog*
- // - *envoy.tracers.opencensus*
- // - *envoy.tracers.xray*
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // Trace driver specific configuration which depends on the driver being instantiated.
- // See the trace drivers for examples:
- //
- // - :ref:`LightstepConfig `
- // - :ref:`ZipkinConfig `
- // - :ref:`DynamicOtConfig `
- // - :ref:`DatadogConfig `
- // - :ref:`OpenCensusConfig `
- // - :ref:`AWS X-Ray `
- oneof config_type {
- google.protobuf.Struct config = 2 [deprecated = true];
-
- google.protobuf.Any typed_config = 3;
- }
- }
-
- // Provides configuration for the HTTP tracer.
- Http http = 1;
-}
-
-// Configuration for the LightStep tracer.
-// [#extension: envoy.tracers.lightstep]
-message LightstepConfig {
- // Available propagation modes
- enum PropagationMode {
- // Propagate trace context in the single header x-ot-span-context.
- ENVOY = 0;
-
- // Propagate trace context using LightStep's native format.
- LIGHTSTEP = 1;
-
- // Propagate trace context using the b3 format.
- B3 = 2;
-
- // Propagation trace context using the w3 trace-context standard.
- TRACE_CONTEXT = 3;
- }
-
- // The cluster manager cluster that hosts the LightStep collectors.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // File containing the access token to the `LightStep
- // `_ API.
- string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Propagation modes to use by LightStep's tracer.
- repeated PropagationMode propagation_modes = 3
- [(validate.rules).repeated = {items {enum {defined_only: true}}}];
-}
-
-// Configuration for the Zipkin tracer.
-// [#extension: envoy.tracers.zipkin]
-// [#next-free-field: 6]
-message ZipkinConfig {
- // Available Zipkin collector endpoint versions.
- enum CollectorEndpointVersion {
- // Zipkin API v1, JSON over HTTP.
- // [#comment: The default implementation of Zipkin client before this field is added was only v1
- // and the way user configure this was by not explicitly specifying the version. Consequently,
- // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
- // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
- // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
- // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
- HTTP_JSON_V1 = 0 [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
-
- // Zipkin API v2, JSON over HTTP.
- HTTP_JSON = 1;
-
- // Zipkin API v2, protobuf over HTTP.
- HTTP_PROTO = 2;
-
- // [#not-implemented-hide:]
- GRPC = 3;
- }
-
- // The cluster manager cluster that hosts the Zipkin collectors. Note that the
- // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
- // resources `.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The API endpoint of the Zipkin service where the spans will be sent. When
- // using a standard Zipkin installation, the API endpoint is typically
- // /api/v1/spans, which is the default value.
- string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Determines whether a 128bit trace id will be used when creating a new
- // trace instance. The default value is false, which will result in a 64 bit trace id being used.
- bool trace_id_128bit = 3;
-
- // Determines whether client and server spans will share the same span context.
- // The default value is true.
- google.protobuf.BoolValue shared_span_context = 4;
-
- // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
- // used.
- CollectorEndpointVersion collector_endpoint_version = 5;
-}
-
-// DynamicOtConfig is used to dynamically load a tracer from a shared library
-// that implements the `OpenTracing dynamic loading API
-// `_.
-// [#extension: envoy.tracers.dynamic_ot]
-message DynamicOtConfig {
- // Dynamic library implementing the `OpenTracing API
- // `_.
- string library = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The configuration to use when creating a tracer from the given dynamic
- // library.
- google.protobuf.Struct config = 2;
-}
-
-// Configuration for the Datadog tracer.
-// [#extension: envoy.tracers.datadog]
-message DatadogConfig {
- // The cluster to use for submitting traces to the Datadog agent.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The name used for the service when traces are generated by envoy.
- string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
-}
-
-// Configuration for the OpenCensus tracer.
-// [#next-free-field: 15]
-// [#extension: envoy.tracers.opencensus]
-message OpenCensusConfig {
- enum TraceContext {
- // No-op default, no trace context is utilized.
- NONE = 0;
-
- // W3C Trace-Context format "traceparent:" header.
- TRACE_CONTEXT = 1;
-
- // Binary "grpc-trace-bin:" header.
- GRPC_TRACE_BIN = 2;
-
- // "X-Cloud-Trace-Context:" header.
- CLOUD_TRACE_CONTEXT = 3;
-
- // X-B3-* headers.
- B3 = 4;
- }
-
- reserved 7;
-
- // Configures tracing, e.g. the sampler, max number of annotations, etc.
- opencensus.proto.trace.v1.TraceConfig trace_config = 1;
-
- // Enables the stdout exporter if set to true. This is intended for debugging
- // purposes.
- bool stdout_exporter_enabled = 2;
-
- // Enables the Stackdriver exporter if set to true. The project_id must also
- // be set.
- bool stackdriver_exporter_enabled = 3;
-
- // The Cloud project_id to use for Stackdriver tracing.
- string stackdriver_project_id = 4;
-
- // (optional) By default, the Stackdriver exporter will connect to production
- // Stackdriver. If stackdriver_address is non-empty, it will instead connect
- // to this address, which is in the gRPC format:
- // https://github.com/grpc/grpc/blob/master/doc/naming.md
- string stackdriver_address = 10;
-
- // (optional) The gRPC server that hosts Stackdriver tracing service. Only
- // Google gRPC is supported. If :ref:`target_uri `
- // is not provided, the default production Stackdriver address will be used.
- api.v2.core.GrpcService stackdriver_grpc_service = 13;
-
- // Enables the Zipkin exporter if set to true. The url and service name must
- // also be set.
- bool zipkin_exporter_enabled = 5;
-
- // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
- string zipkin_url = 6;
-
- // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
- // ocagent_grpc_service must also be set.
- bool ocagent_exporter_enabled = 11;
-
- // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
- // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
- // [#comment:TODO: deprecate this field]
- string ocagent_address = 12;
-
- // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
- // This is only used if the ocagent_address is left empty.
- api.v2.core.GrpcService ocagent_grpc_service = 14;
-
- // List of incoming trace context headers we will accept. First one found
- // wins.
- repeated TraceContext incoming_trace_context = 8;
-
- // List of outgoing trace context headers we will produce.
- repeated TraceContext outgoing_trace_context = 9;
-}
-
-// Configuration structure.
-message TraceServiceConfig {
- // The upstream gRPC cluster that hosts the metrics service.
- api.v2.core.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
-}
diff --git a/generated_api_shadow/envoy/config/trace/v2/zipkin.proto b/generated_api_shadow/envoy/config/trace/v2/zipkin.proto
new file mode 100644
index 000000000000..a825d85bb7f9
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v2/zipkin.proto
@@ -0,0 +1,64 @@
+syntax = "proto3";
+
+package envoy.config.trace.v2;
+
+import "google/protobuf/wrappers.proto";
+
+import "envoy/annotations/deprecation.proto";
+import "udpa/annotations/status.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v2";
+option java_outer_classname = "ZipkinProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = FROZEN;
+
+// [#protodoc-title: Zipkin tracer]
+
+// Configuration for the Zipkin tracer.
+// [#extension: envoy.tracers.zipkin]
+// [#next-free-field: 6]
+message ZipkinConfig {
+ // Available Zipkin collector endpoint versions.
+ enum CollectorEndpointVersion {
+ // Zipkin API v1, JSON over HTTP.
+ // [#comment: The default implementation of Zipkin client before this field is added was only v1
+ // and the way user configure this was by not explicitly specifying the version. Consequently,
+ // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
+ // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
+ // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
+ // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
+ HTTP_JSON_V1 = 0 [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
+
+ // Zipkin API v2, JSON over HTTP.
+ HTTP_JSON = 1;
+
+ // Zipkin API v2, protobuf over HTTP.
+ HTTP_PROTO = 2;
+
+ // [#not-implemented-hide:]
+ GRPC = 3;
+ }
+
+ // The cluster manager cluster that hosts the Zipkin collectors. Note that the
+ // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
+ // resources `.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The API endpoint of the Zipkin service where the spans will be sent. When
+ // using a standard Zipkin installation, the API endpoint is typically
+ // /api/v1/spans, which is the default value.
+ string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Determines whether a 128bit trace id will be used when creating a new
+ // trace instance. The default value is false, which will result in a 64 bit trace id being used.
+ bool trace_id_128bit = 3;
+
+ // Determines whether client and server spans will share the same span context.
+ // The default value is true.
+ google.protobuf.BoolValue shared_span_context = 4;
+
+ // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
+ // used.
+ CollectorEndpointVersion collector_endpoint_version = 5;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v3/datadog.proto b/generated_api_shadow/envoy/config/trace/v3/datadog.proto
new file mode 100644
index 000000000000..f1fe3e666125
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v3/datadog.proto
@@ -0,0 +1,29 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "DatadogProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.datadog.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Datadog tracer]
+
+// Configuration for the Datadog tracer.
+// [#extension: envoy.tracers.datadog]
+message DatadogConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.DatadogConfig";
+
+ // The cluster to use for submitting traces to the Datadog agent.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The name used for the service when traces are generated by envoy.
+ string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
+}
diff --git a/generated_api_shadow/envoy/config/trace/v3/dynamic_ot.proto b/generated_api_shadow/envoy/config/trace/v3/dynamic_ot.proto
new file mode 100644
index 000000000000..fb372da8c52a
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v3/dynamic_ot.proto
@@ -0,0 +1,36 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "DynamicOtProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package =
+ "envoy.extensions.tracers.dynamic_ot.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Dynamically loadable OpenTracing tracer]
+
+// DynamicOtConfig is used to dynamically load a tracer from a shared library
+// that implements the `OpenTracing dynamic loading API
+// `_.
+// [#extension: envoy.tracers.dynamic_ot]
+message DynamicOtConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.DynamicOtConfig";
+
+ // Dynamic library implementing the `OpenTracing API
+ // `_.
+ string library = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The configuration to use when creating a tracer from the given dynamic
+ // library.
+ google.protobuf.Struct config = 2;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v3/http_tracer.proto b/generated_api_shadow/envoy/config/trace/v3/http_tracer.proto
new file mode 100644
index 000000000000..6470a70de43d
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v3/http_tracer.proto
@@ -0,0 +1,71 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "HttpTracerProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Tracing]
+// Tracing :ref:`architecture overview `.
+
+// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
+//
+// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
+// supported.
+//
+// .. attention::
+//
+// Use of this message type has been deprecated in favor of direct use of
+// :ref:`Tracing.Http `.
+message Tracing {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.Tracing";
+
+ // Configuration for an HTTP tracer provider used by Envoy.
+ //
+ // The configuration is defined by the
+ // :ref:`HttpConnectionManager.Tracing `
+ // :ref:`provider `
+ // field.
+ message Http {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.Tracing.Http";
+
+ // The name of the HTTP trace driver to instantiate. The name must match a
+ // supported HTTP trace driver. Built-in trace drivers:
+ //
+ // - *envoy.tracers.lightstep*
+ // - *envoy.tracers.zipkin*
+ // - *envoy.tracers.dynamic_ot*
+ // - *envoy.tracers.datadog*
+ // - *envoy.tracers.opencensus*
+ // - *envoy.tracers.xray*
+ string name = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // Trace driver specific configuration which depends on the driver being instantiated.
+ // See the trace drivers for examples:
+ //
+ // - :ref:`LightstepConfig `
+ // - :ref:`ZipkinConfig `
+ // - :ref:`DynamicOtConfig `
+ // - :ref:`DatadogConfig `
+ // - :ref:`OpenCensusConfig `
+ // - :ref:`AWS X-Ray `
+ oneof config_type {
+ google.protobuf.Any typed_config = 3;
+
+ google.protobuf.Struct hidden_envoy_deprecated_config = 2 [deprecated = true];
+ }
+ }
+
+ // Provides configuration for the HTTP tracer.
+ Http http = 1;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v3/lightstep.proto b/generated_api_shadow/envoy/config/trace/v3/lightstep.proto
new file mode 100644
index 000000000000..0e0b60b5bddb
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v3/lightstep.proto
@@ -0,0 +1,50 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "LightstepProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package =
+ "envoy.extensions.tracers.lightstep.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: LightStep tracer]
+
+// Configuration for the LightStep tracer.
+// [#extension: envoy.tracers.lightstep]
+message LightstepConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.LightstepConfig";
+
+ // Available propagation modes
+ enum PropagationMode {
+ // Propagate trace context in the single header x-ot-span-context.
+ ENVOY = 0;
+
+ // Propagate trace context using LightStep's native format.
+ LIGHTSTEP = 1;
+
+ // Propagate trace context using the b3 format.
+ B3 = 2;
+
+ // Propagation trace context using the w3 trace-context standard.
+ TRACE_CONTEXT = 3;
+ }
+
+ // The cluster manager cluster that hosts the LightStep collectors.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // File containing the access token to the `LightStep
+ // `_ API.
+ string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Propagation modes to use by LightStep's tracer.
+ repeated PropagationMode propagation_modes = 3
+ [(validate.rules).repeated = {items {enum {defined_only: true}}}];
+}
diff --git a/generated_api_shadow/envoy/config/trace/v3/opencensus.proto b/generated_api_shadow/envoy/config/trace/v3/opencensus.proto
new file mode 100644
index 000000000000..39313139177f
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v3/opencensus.proto
@@ -0,0 +1,100 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "envoy/config/core/v3/grpc_service.proto";
+
+import "opencensus/proto/trace/v1/trace_config.proto";
+
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "OpencensusProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package =
+ "envoy.extensions.tracers.opencensus.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: OpenCensus tracer]
+
+// Configuration for the OpenCensus tracer.
+// [#next-free-field: 15]
+// [#extension: envoy.tracers.opencensus]
+message OpenCensusConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.OpenCensusConfig";
+
+ enum TraceContext {
+ // No-op default, no trace context is utilized.
+ NONE = 0;
+
+ // W3C Trace-Context format "traceparent:" header.
+ TRACE_CONTEXT = 1;
+
+ // Binary "grpc-trace-bin:" header.
+ GRPC_TRACE_BIN = 2;
+
+ // "X-Cloud-Trace-Context:" header.
+ CLOUD_TRACE_CONTEXT = 3;
+
+ // X-B3-* headers.
+ B3 = 4;
+ }
+
+ reserved 7;
+
+ // Configures tracing, e.g. the sampler, max number of annotations, etc.
+ opencensus.proto.trace.v1.TraceConfig trace_config = 1;
+
+ // Enables the stdout exporter if set to true. This is intended for debugging
+ // purposes.
+ bool stdout_exporter_enabled = 2;
+
+ // Enables the Stackdriver exporter if set to true. The project_id must also
+ // be set.
+ bool stackdriver_exporter_enabled = 3;
+
+ // The Cloud project_id to use for Stackdriver tracing.
+ string stackdriver_project_id = 4;
+
+ // (optional) By default, the Stackdriver exporter will connect to production
+ // Stackdriver. If stackdriver_address is non-empty, it will instead connect
+ // to this address, which is in the gRPC format:
+ // https://github.com/grpc/grpc/blob/master/doc/naming.md
+ string stackdriver_address = 10;
+
+ // (optional) The gRPC server that hosts Stackdriver tracing service. Only
+ // Google gRPC is supported. If :ref:`target_uri `
+ // is not provided, the default production Stackdriver address will be used.
+ core.v3.GrpcService stackdriver_grpc_service = 13;
+
+ // Enables the Zipkin exporter if set to true. The url and service name must
+ // also be set.
+ bool zipkin_exporter_enabled = 5;
+
+ // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
+ string zipkin_url = 6;
+
+ // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
+ // ocagent_grpc_service must also be set.
+ bool ocagent_exporter_enabled = 11;
+
+ // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
+ // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
+ // [#comment:TODO: deprecate this field]
+ string ocagent_address = 12;
+
+ // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
+ // This is only used if the ocagent_address is left empty.
+ core.v3.GrpcService ocagent_grpc_service = 14;
+
+ // List of incoming trace context headers we will accept. First one found
+ // wins.
+ repeated TraceContext incoming_trace_context = 8;
+
+ // List of outgoing trace context headers we will produce.
+ repeated TraceContext outgoing_trace_context = 9;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v3/service.proto b/generated_api_shadow/envoy/config/trace/v3/service.proto
new file mode 100644
index 000000000000..1e01ff61847f
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v3/service.proto
@@ -0,0 +1,25 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "envoy/config/core/v3/grpc_service.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "ServiceProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Trace Service]
+
+// Configuration structure.
+message TraceServiceConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v2.TraceServiceConfig";
+
+ // The upstream gRPC cluster that hosts the metrics service.
+ core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
+}
diff --git a/generated_api_shadow/envoy/config/trace/v3/trace.proto b/generated_api_shadow/envoy/config/trace/v3/trace.proto
index 955f1949adff..e1db72a2fd5a 100644
--- a/generated_api_shadow/envoy/config/trace/v3/trace.proto
+++ b/generated_api_shadow/envoy/config/trace/v3/trace.proto
@@ -2,278 +2,16 @@ syntax = "proto3";
package envoy.config.trace.v3;
-import "envoy/config/core/v3/grpc_service.proto";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/wrappers.proto";
-
-import "opencensus/proto/trace/v1/trace_config.proto";
-
-import "envoy/annotations/deprecation.proto";
import "udpa/annotations/status.proto";
-import "udpa/annotations/versioning.proto";
-import "validate/validate.proto";
+
+import public "envoy/config/trace/v3/datadog.proto";
+import public "envoy/config/trace/v3/dynamic_ot.proto";
+import public "envoy/config/trace/v3/http_tracer.proto";
+import public "envoy/config/trace/v3/lightstep.proto";
+import public "envoy/config/trace/v3/opencensus.proto";
+import public "envoy/config/trace/v3/service.proto";
+import public "envoy/config/trace/v3/zipkin.proto";
option java_package = "io.envoyproxy.envoy.config.trace.v3";
option java_outer_classname = "TraceProto";
option java_multiple_files = true;
-option (udpa.annotations.file_status).package_version_status = ACTIVE;
-
-// [#protodoc-title: Tracing]
-// Tracing :ref:`architecture overview `.
-
-// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
-//
-// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
-// supported.
-//
-// .. attention::
-//
-// Use of this message type has been deprecated in favor of direct use of
-// :ref:`Tracing.Http `.
-message Tracing {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.Tracing";
-
- // Configuration for an HTTP tracer provider used by Envoy.
- //
- // The configuration is defined by the
- // :ref:`HttpConnectionManager.Tracing `
- // :ref:`provider `
- // field.
- message Http {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.Tracing.Http";
-
- // The name of the HTTP trace driver to instantiate. The name must match a
- // supported HTTP trace driver. Built-in trace drivers:
- //
- // - *envoy.tracers.lightstep*
- // - *envoy.tracers.zipkin*
- // - *envoy.tracers.dynamic_ot*
- // - *envoy.tracers.datadog*
- // - *envoy.tracers.opencensus*
- // - *envoy.tracers.xray*
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // Trace driver specific configuration which depends on the driver being instantiated.
- // See the trace drivers for examples:
- //
- // - :ref:`LightstepConfig `
- // - :ref:`ZipkinConfig `
- // - :ref:`DynamicOtConfig `
- // - :ref:`DatadogConfig `
- // - :ref:`OpenCensusConfig `
- // - :ref:`AWS X-Ray `
- oneof config_type {
- google.protobuf.Any typed_config = 3;
-
- google.protobuf.Struct hidden_envoy_deprecated_config = 2 [deprecated = true];
- }
- }
-
- // Provides configuration for the HTTP tracer.
- Http http = 1;
-}
-
-// Configuration for the LightStep tracer.
-// [#extension: envoy.tracers.lightstep]
-message LightstepConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.LightstepConfig";
-
- // Available propagation modes
- enum PropagationMode {
- // Propagate trace context in the single header x-ot-span-context.
- ENVOY = 0;
-
- // Propagate trace context using LightStep's native format.
- LIGHTSTEP = 1;
-
- // Propagate trace context using the b3 format.
- B3 = 2;
-
- // Propagation trace context using the w3 trace-context standard.
- TRACE_CONTEXT = 3;
- }
-
- // The cluster manager cluster that hosts the LightStep collectors.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // File containing the access token to the `LightStep
- // `_ API.
- string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Propagation modes to use by LightStep's tracer.
- repeated PropagationMode propagation_modes = 3
- [(validate.rules).repeated = {items {enum {defined_only: true}}}];
-}
-
-// Configuration for the Zipkin tracer.
-// [#extension: envoy.tracers.zipkin]
-// [#next-free-field: 6]
-message ZipkinConfig {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.ZipkinConfig";
-
- // Available Zipkin collector endpoint versions.
- enum CollectorEndpointVersion {
- // Zipkin API v1, JSON over HTTP.
- // [#comment: The default implementation of Zipkin client before this field is added was only v1
- // and the way user configure this was by not explicitly specifying the version. Consequently,
- // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
- // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
- // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
- // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
- hidden_envoy_deprecated_HTTP_JSON_V1 = 0
- [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
-
- // Zipkin API v2, JSON over HTTP.
- HTTP_JSON = 1;
-
- // Zipkin API v2, protobuf over HTTP.
- HTTP_PROTO = 2;
-
- // [#not-implemented-hide:]
- GRPC = 3;
- }
-
- // The cluster manager cluster that hosts the Zipkin collectors. Note that the
- // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
- // resources `.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The API endpoint of the Zipkin service where the spans will be sent. When
- // using a standard Zipkin installation, the API endpoint is typically
- // /api/v1/spans, which is the default value.
- string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Determines whether a 128bit trace id will be used when creating a new
- // trace instance. The default value is false, which will result in a 64 bit trace id being used.
- bool trace_id_128bit = 3;
-
- // Determines whether client and server spans will share the same span context.
- // The default value is true.
- google.protobuf.BoolValue shared_span_context = 4;
-
- // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
- // used.
- CollectorEndpointVersion collector_endpoint_version = 5;
-}
-
-// DynamicOtConfig is used to dynamically load a tracer from a shared library
-// that implements the `OpenTracing dynamic loading API
-// `_.
-// [#extension: envoy.tracers.dynamic_ot]
-message DynamicOtConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.DynamicOtConfig";
-
- // Dynamic library implementing the `OpenTracing API
- // `_.
- string library = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The configuration to use when creating a tracer from the given dynamic
- // library.
- google.protobuf.Struct config = 2;
-}
-
-// Configuration for the Datadog tracer.
-// [#extension: envoy.tracers.datadog]
-message DatadogConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.DatadogConfig";
-
- // The cluster to use for submitting traces to the Datadog agent.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The name used for the service when traces are generated by envoy.
- string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
-}
-
-// Configuration for the OpenCensus tracer.
-// [#next-free-field: 15]
-// [#extension: envoy.tracers.opencensus]
-message OpenCensusConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.OpenCensusConfig";
-
- enum TraceContext {
- // No-op default, no trace context is utilized.
- NONE = 0;
-
- // W3C Trace-Context format "traceparent:" header.
- TRACE_CONTEXT = 1;
-
- // Binary "grpc-trace-bin:" header.
- GRPC_TRACE_BIN = 2;
-
- // "X-Cloud-Trace-Context:" header.
- CLOUD_TRACE_CONTEXT = 3;
-
- // X-B3-* headers.
- B3 = 4;
- }
-
- reserved 7;
-
- // Configures tracing, e.g. the sampler, max number of annotations, etc.
- opencensus.proto.trace.v1.TraceConfig trace_config = 1;
-
- // Enables the stdout exporter if set to true. This is intended for debugging
- // purposes.
- bool stdout_exporter_enabled = 2;
-
- // Enables the Stackdriver exporter if set to true. The project_id must also
- // be set.
- bool stackdriver_exporter_enabled = 3;
-
- // The Cloud project_id to use for Stackdriver tracing.
- string stackdriver_project_id = 4;
-
- // (optional) By default, the Stackdriver exporter will connect to production
- // Stackdriver. If stackdriver_address is non-empty, it will instead connect
- // to this address, which is in the gRPC format:
- // https://github.com/grpc/grpc/blob/master/doc/naming.md
- string stackdriver_address = 10;
-
- // (optional) The gRPC server that hosts Stackdriver tracing service. Only
- // Google gRPC is supported. If :ref:`target_uri `
- // is not provided, the default production Stackdriver address will be used.
- core.v3.GrpcService stackdriver_grpc_service = 13;
-
- // Enables the Zipkin exporter if set to true. The url and service name must
- // also be set.
- bool zipkin_exporter_enabled = 5;
-
- // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
- string zipkin_url = 6;
-
- // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
- // ocagent_grpc_service must also be set.
- bool ocagent_exporter_enabled = 11;
-
- // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
- // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
- // [#comment:TODO: deprecate this field]
- string ocagent_address = 12;
-
- // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
- // This is only used if the ocagent_address is left empty.
- core.v3.GrpcService ocagent_grpc_service = 14;
-
- // List of incoming trace context headers we will accept. First one found
- // wins.
- repeated TraceContext incoming_trace_context = 8;
-
- // List of outgoing trace context headers we will produce.
- repeated TraceContext outgoing_trace_context = 9;
-}
-
-// Configuration structure.
-message TraceServiceConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v2.TraceServiceConfig";
-
- // The upstream gRPC cluster that hosts the metrics service.
- core.v3.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
-}
diff --git a/generated_api_shadow/envoy/config/trace/v3/xray.proto b/generated_api_shadow/envoy/config/trace/v3/xray.proto
index c4259177d657..ba3fa66ad3e2 100644
--- a/generated_api_shadow/envoy/config/trace/v3/xray.proto
+++ b/generated_api_shadow/envoy/config/trace/v3/xray.proto
@@ -5,6 +5,7 @@ package envoy.config.trace.v3;
import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/base.proto";
+import "udpa/annotations/migrate.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
@@ -12,6 +13,7 @@ import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.config.trace.v3";
option java_outer_classname = "XrayProto";
option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.xray.v4alpha";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: AWS X-Ray Tracer Configuration]
diff --git a/generated_api_shadow/envoy/config/trace/v3/zipkin.proto b/generated_api_shadow/envoy/config/trace/v3/zipkin.proto
new file mode 100644
index 000000000000..10cf6d4ec3c4
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v3/zipkin.proto
@@ -0,0 +1,70 @@
+syntax = "proto3";
+
+package envoy.config.trace.v3;
+
+import "google/protobuf/wrappers.proto";
+
+import "envoy/annotations/deprecation.proto";
+import "udpa/annotations/migrate.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v3";
+option java_outer_classname = "ZipkinProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.tracers.zipkin.v4alpha";
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: Zipkin tracer]
+
+// Configuration for the Zipkin tracer.
+// [#extension: envoy.tracers.zipkin]
+// [#next-free-field: 6]
+message ZipkinConfig {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.ZipkinConfig";
+
+ // Available Zipkin collector endpoint versions.
+ enum CollectorEndpointVersion {
+ // Zipkin API v1, JSON over HTTP.
+ // [#comment: The default implementation of Zipkin client before this field is added was only v1
+ // and the way user configure this was by not explicitly specifying the version. Consequently,
+ // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
+ // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
+ // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
+ // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
+ hidden_envoy_deprecated_HTTP_JSON_V1 = 0
+ [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
+
+ // Zipkin API v2, JSON over HTTP.
+ HTTP_JSON = 1;
+
+ // Zipkin API v2, protobuf over HTTP.
+ HTTP_PROTO = 2;
+
+ // [#not-implemented-hide:]
+ GRPC = 3;
+ }
+
+ // The cluster manager cluster that hosts the Zipkin collectors. Note that the
+ // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
+ // resources `.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The API endpoint of the Zipkin service where the spans will be sent. When
+ // using a standard Zipkin installation, the API endpoint is typically
+ // /api/v1/spans, which is the default value.
+ string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Determines whether a 128bit trace id will be used when creating a new
+ // trace instance. The default value is false, which will result in a 64 bit trace id being used.
+ bool trace_id_128bit = 3;
+
+ // Determines whether client and server spans will share the same span context.
+ // The default value is true.
+ google.protobuf.BoolValue shared_span_context = 4;
+
+ // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
+ // used.
+ CollectorEndpointVersion collector_endpoint_version = 5;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v4alpha/BUILD b/generated_api_shadow/envoy/config/trace/v4alpha/BUILD
index 53ae98aac140..d8ce683c41d6 100644
--- a/generated_api_shadow/envoy/config/trace/v4alpha/BUILD
+++ b/generated_api_shadow/envoy/config/trace/v4alpha/BUILD
@@ -6,10 +6,8 @@ licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
- "//envoy/annotations:pkg",
"//envoy/config/core/v4alpha:pkg",
"//envoy/config/trace/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
- "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto",
],
)
diff --git a/generated_api_shadow/envoy/config/trace/v4alpha/http_tracer.proto b/generated_api_shadow/envoy/config/trace/v4alpha/http_tracer.proto
new file mode 100644
index 000000000000..663886a97bb4
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v4alpha/http_tracer.proto
@@ -0,0 +1,73 @@
+syntax = "proto3";
+
+package envoy.config.trace.v4alpha;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
+option java_outer_classname = "HttpTracerProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Tracing]
+// Tracing :ref:`architecture overview `.
+
+// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
+//
+// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
+// supported.
+//
+// .. attention::
+//
+// Use of this message type has been deprecated in favor of direct use of
+// :ref:`Tracing.Http `.
+message Tracing {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.Tracing";
+
+ // Configuration for an HTTP tracer provider used by Envoy.
+ //
+ // The configuration is defined by the
+ // :ref:`HttpConnectionManager.Tracing `
+ // :ref:`provider `
+ // field.
+ message Http {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.Tracing.Http";
+
+ reserved 2;
+
+ reserved "config";
+
+ // The name of the HTTP trace driver to instantiate. The name must match a
+ // supported HTTP trace driver. Built-in trace drivers:
+ //
+ // - *envoy.tracers.lightstep*
+ // - *envoy.tracers.zipkin*
+ // - *envoy.tracers.dynamic_ot*
+ // - *envoy.tracers.datadog*
+ // - *envoy.tracers.opencensus*
+ // - *envoy.tracers.xray*
+ string name = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // Trace driver specific configuration which depends on the driver being instantiated.
+ // See the trace drivers for examples:
+ //
+ // - :ref:`LightstepConfig `
+ // - :ref:`ZipkinConfig `
+ // - :ref:`DynamicOtConfig `
+ // - :ref:`DatadogConfig `
+ // - :ref:`OpenCensusConfig `
+ // - :ref:`AWS X-Ray `
+ oneof config_type {
+ google.protobuf.Any typed_config = 3;
+ }
+ }
+
+ // Provides configuration for the HTTP tracer.
+ Http http = 1;
+}
diff --git a/generated_api_shadow/envoy/config/trace/v4alpha/service.proto b/generated_api_shadow/envoy/config/trace/v4alpha/service.proto
new file mode 100644
index 000000000000..d132b32dd79d
--- /dev/null
+++ b/generated_api_shadow/envoy/config/trace/v4alpha/service.proto
@@ -0,0 +1,25 @@
+syntax = "proto3";
+
+package envoy.config.trace.v4alpha;
+
+import "envoy/config/core/v4alpha/grpc_service.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
+option java_outer_classname = "ServiceProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Trace Service]
+
+// Configuration structure.
+message TraceServiceConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.TraceServiceConfig";
+
+ // The upstream gRPC cluster that hosts the metrics service.
+ core.v4alpha.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
+}
diff --git a/generated_api_shadow/envoy/config/trace/v4alpha/trace.proto b/generated_api_shadow/envoy/config/trace/v4alpha/trace.proto
deleted file mode 100644
index 310376381ad9..000000000000
--- a/generated_api_shadow/envoy/config/trace/v4alpha/trace.proto
+++ /dev/null
@@ -1,281 +0,0 @@
-syntax = "proto3";
-
-package envoy.config.trace.v4alpha;
-
-import "envoy/config/core/v4alpha/grpc_service.proto";
-
-import "google/protobuf/any.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/wrappers.proto";
-
-import "opencensus/proto/trace/v1/trace_config.proto";
-
-import "envoy/annotations/deprecation.proto";
-import "udpa/annotations/status.proto";
-import "udpa/annotations/versioning.proto";
-import "validate/validate.proto";
-
-option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
-option java_outer_classname = "TraceProto";
-option java_multiple_files = true;
-option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
-
-// [#protodoc-title: Tracing]
-// Tracing :ref:`architecture overview `.
-
-// The tracing configuration specifies settings for an HTTP tracer provider used by Envoy.
-//
-// Envoy may support other tracers in the future, but right now the HTTP tracer is the only one
-// supported.
-//
-// .. attention::
-//
-// Use of this message type has been deprecated in favor of direct use of
-// :ref:`Tracing.Http `.
-message Tracing {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.Tracing";
-
- // Configuration for an HTTP tracer provider used by Envoy.
- //
- // The configuration is defined by the
- // :ref:`HttpConnectionManager.Tracing `
- // :ref:`provider `
- // field.
- message Http {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.Tracing.Http";
-
- reserved 2;
-
- reserved "config";
-
- // The name of the HTTP trace driver to instantiate. The name must match a
- // supported HTTP trace driver. Built-in trace drivers:
- //
- // - *envoy.tracers.lightstep*
- // - *envoy.tracers.zipkin*
- // - *envoy.tracers.dynamic_ot*
- // - *envoy.tracers.datadog*
- // - *envoy.tracers.opencensus*
- // - *envoy.tracers.xray*
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // Trace driver specific configuration which depends on the driver being instantiated.
- // See the trace drivers for examples:
- //
- // - :ref:`LightstepConfig `
- // - :ref:`ZipkinConfig `
- // - :ref:`DynamicOtConfig `
- // - :ref:`DatadogConfig `
- // - :ref:`OpenCensusConfig `
- // - :ref:`AWS X-Ray `
- oneof config_type {
- google.protobuf.Any typed_config = 3;
- }
- }
-
- // Provides configuration for the HTTP tracer.
- Http http = 1;
-}
-
-// Configuration for the LightStep tracer.
-// [#extension: envoy.tracers.lightstep]
-message LightstepConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.LightstepConfig";
-
- // Available propagation modes
- enum PropagationMode {
- // Propagate trace context in the single header x-ot-span-context.
- ENVOY = 0;
-
- // Propagate trace context using LightStep's native format.
- LIGHTSTEP = 1;
-
- // Propagate trace context using the b3 format.
- B3 = 2;
-
- // Propagation trace context using the w3 trace-context standard.
- TRACE_CONTEXT = 3;
- }
-
- // The cluster manager cluster that hosts the LightStep collectors.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // File containing the access token to the `LightStep
- // `_ API.
- string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Propagation modes to use by LightStep's tracer.
- repeated PropagationMode propagation_modes = 3
- [(validate.rules).repeated = {items {enum {defined_only: true}}}];
-}
-
-// Configuration for the Zipkin tracer.
-// [#extension: envoy.tracers.zipkin]
-// [#next-free-field: 6]
-message ZipkinConfig {
- option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.ZipkinConfig";
-
- // Available Zipkin collector endpoint versions.
- enum CollectorEndpointVersion {
- // Zipkin API v1, JSON over HTTP.
- // [#comment: The default implementation of Zipkin client before this field is added was only v1
- // and the way user configure this was by not explicitly specifying the version. Consequently,
- // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
- // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
- // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
- // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
- hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0
- [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
-
- // Zipkin API v2, JSON over HTTP.
- HTTP_JSON = 1;
-
- // Zipkin API v2, protobuf over HTTP.
- HTTP_PROTO = 2;
-
- // [#not-implemented-hide:]
- GRPC = 3;
- }
-
- // The cluster manager cluster that hosts the Zipkin collectors. Note that the
- // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
- // resources `.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The API endpoint of the Zipkin service where the spans will be sent. When
- // using a standard Zipkin installation, the API endpoint is typically
- // /api/v1/spans, which is the default value.
- string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
-
- // Determines whether a 128bit trace id will be used when creating a new
- // trace instance. The default value is false, which will result in a 64 bit trace id being used.
- bool trace_id_128bit = 3;
-
- // Determines whether client and server spans will share the same span context.
- // The default value is true.
- google.protobuf.BoolValue shared_span_context = 4;
-
- // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
- // used.
- CollectorEndpointVersion collector_endpoint_version = 5;
-}
-
-// DynamicOtConfig is used to dynamically load a tracer from a shared library
-// that implements the `OpenTracing dynamic loading API
-// `_.
-// [#extension: envoy.tracers.dynamic_ot]
-message DynamicOtConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.DynamicOtConfig";
-
- // Dynamic library implementing the `OpenTracing API
- // `_.
- string library = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The configuration to use when creating a tracer from the given dynamic
- // library.
- google.protobuf.Struct config = 2;
-}
-
-// Configuration for the Datadog tracer.
-// [#extension: envoy.tracers.datadog]
-message DatadogConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.DatadogConfig";
-
- // The cluster to use for submitting traces to the Datadog agent.
- string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
-
- // The name used for the service when traces are generated by envoy.
- string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
-}
-
-// Configuration for the OpenCensus tracer.
-// [#next-free-field: 15]
-// [#extension: envoy.tracers.opencensus]
-message OpenCensusConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.OpenCensusConfig";
-
- enum TraceContext {
- // No-op default, no trace context is utilized.
- NONE = 0;
-
- // W3C Trace-Context format "traceparent:" header.
- TRACE_CONTEXT = 1;
-
- // Binary "grpc-trace-bin:" header.
- GRPC_TRACE_BIN = 2;
-
- // "X-Cloud-Trace-Context:" header.
- CLOUD_TRACE_CONTEXT = 3;
-
- // X-B3-* headers.
- B3 = 4;
- }
-
- reserved 7;
-
- // Configures tracing, e.g. the sampler, max number of annotations, etc.
- opencensus.proto.trace.v1.TraceConfig trace_config = 1;
-
- // Enables the stdout exporter if set to true. This is intended for debugging
- // purposes.
- bool stdout_exporter_enabled = 2;
-
- // Enables the Stackdriver exporter if set to true. The project_id must also
- // be set.
- bool stackdriver_exporter_enabled = 3;
-
- // The Cloud project_id to use for Stackdriver tracing.
- string stackdriver_project_id = 4;
-
- // (optional) By default, the Stackdriver exporter will connect to production
- // Stackdriver. If stackdriver_address is non-empty, it will instead connect
- // to this address, which is in the gRPC format:
- // https://github.com/grpc/grpc/blob/master/doc/naming.md
- string stackdriver_address = 10;
-
- // (optional) The gRPC server that hosts Stackdriver tracing service. Only
- // Google gRPC is supported. If :ref:`target_uri `
- // is not provided, the default production Stackdriver address will be used.
- core.v4alpha.GrpcService stackdriver_grpc_service = 13;
-
- // Enables the Zipkin exporter if set to true. The url and service name must
- // also be set.
- bool zipkin_exporter_enabled = 5;
-
- // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
- string zipkin_url = 6;
-
- // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
- // ocagent_grpc_service must also be set.
- bool ocagent_exporter_enabled = 11;
-
- // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
- // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
- // [#comment:TODO: deprecate this field]
- string ocagent_address = 12;
-
- // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
- // This is only used if the ocagent_address is left empty.
- core.v4alpha.GrpcService ocagent_grpc_service = 14;
-
- // List of incoming trace context headers we will accept. First one found
- // wins.
- repeated TraceContext incoming_trace_context = 8;
-
- // List of outgoing trace context headers we will produce.
- repeated TraceContext outgoing_trace_context = 9;
-}
-
-// Configuration structure.
-message TraceServiceConfig {
- option (udpa.annotations.versioning).previous_message_type =
- "envoy.config.trace.v3.TraceServiceConfig";
-
- // The upstream gRPC cluster that hosts the metrics service.
- core.v4alpha.GrpcService grpc_service = 1 [(validate.rules).message = {required: true}];
-}
diff --git a/generated_api_shadow/envoy/extensions/filters/http/grpc_stats/v3/config.proto b/generated_api_shadow/envoy/extensions/filters/http/grpc_stats/v3/config.proto
index 1fecdaea0a16..d5aca14ea530 100644
--- a/generated_api_shadow/envoy/extensions/filters/http/grpc_stats/v3/config.proto
+++ b/generated_api_shadow/envoy/extensions/filters/http/grpc_stats/v3/config.proto
@@ -28,12 +28,12 @@ message FilterConfig {
// counts.
bool emit_filter_state = 1;
- oneof per_method_stat_specifier {
- // If set, specifies an allowlist of service/methods that will have individual stats
- // emitted for them. Any call that does not match the allowlist will be counted
- // in a stat with no method specifier: `cluster..grpc.*`.
- config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
+ // If set, specifies an allowlist of service/methods that will have individual stats
+ // emitted for them. Any call that does not match the allowlist will be counted
+ // in a stat with no method specifier: `cluster..grpc.*`.
+ bool enable_upstream_stats = 4;
+ oneof per_method_stat_specifier {
// If set to true, emit stats for all service/method names.
//
// If set to false, emit stats for all service/message types to the same stats without including
@@ -52,6 +52,14 @@ message FilterConfig {
// `stats_for_all_methods=false` in order to be safe by default. This behavior can be
// controlled with runtime override
// `envoy.deprecated_features.grpc_stats_filter_enable_stats_for_all_methods_by_default`.
+ config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
+
+ // If true, the filter will gather a histogram for the request time of the upstream.
+ // It works with :ref:`stats_for_all_methods
+ // `
+ // and :ref:`individual_method_stats_allowlist
+ // ` the same way
+ // request_message_count and response_message_count works.
google.protobuf.BoolValue stats_for_all_methods = 3;
}
}
diff --git a/generated_api_shadow/envoy/extensions/filters/http/jwt_authn/v3/config.proto b/generated_api_shadow/envoy/extensions/filters/http/jwt_authn/v3/config.proto
index 802a582a572a..592610819bdc 100644
--- a/generated_api_shadow/envoy/extensions/filters/http/jwt_authn/v3/config.proto
+++ b/generated_api_shadow/envoy/extensions/filters/http/jwt_authn/v3/config.proto
@@ -142,7 +142,8 @@ message JwtProvider {
//
// ``x-goog-iap-jwt-assertion: ``.
//
- string forward_payload_header = 8;
+ string forward_payload_header = 8
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_NAME strict: false}];
// JWT is sent in a query parameter. `jwt_params` represents the query parameter names.
//
@@ -218,12 +219,14 @@ message JwtHeader {
"envoy.config.filter.http.jwt_authn.v2alpha.JwtHeader";
// The HTTP header name.
- string name = 1 [(validate.rules).string = {min_bytes: 1}];
+ string name = 1
+ [(validate.rules).string = {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}];
// The value prefix. The value format is "value_prefix"
// For example, for "Authorization: Bearer ", value_prefix="Bearer " with a space at the
// end.
- string value_prefix = 2;
+ string value_prefix = 2
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
}
// Specify a required provider with audiences.
diff --git a/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto b/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
index e22a3a1ee188..b04d0861c953 100644
--- a/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
+++ b/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
@@ -7,7 +7,7 @@ import "envoy/config/core/v3/config_source.proto";
import "envoy/config/core/v3/protocol.proto";
import "envoy/config/route/v3/route.proto";
import "envoy/config/route/v3/scoped_route.proto";
-import "envoy/config/trace/v3/trace.proto";
+import "envoy/config/trace/v3/http_tracer.proto";
import "envoy/type/tracing/v3/custom_tag.proto";
import "envoy/type/v3/percent.proto";
diff --git a/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto b/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto
index 5a05a8531f35..975b71cc892f 100644
--- a/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto
+++ b/generated_api_shadow/envoy/extensions/filters/network/http_connection_manager/v4alpha/http_connection_manager.proto
@@ -7,7 +7,7 @@ import "envoy/config/core/v4alpha/config_source.proto";
import "envoy/config/core/v4alpha/protocol.proto";
import "envoy/config/route/v4alpha/route.proto";
import "envoy/config/route/v4alpha/scoped_route.proto";
-import "envoy/config/trace/v4alpha/trace.proto";
+import "envoy/config/trace/v4alpha/http_tracer.proto";
import "envoy/type/tracing/v3/custom_tag.proto";
import "envoy/type/v3/percent.proto";
diff --git a/generated_api_shadow/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/BUILD b/generated_api_shadow/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/BUILD
new file mode 100644
index 000000000000..1dcb37e5c342
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/extensions/common/dynamic_forward_proxy/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/generated_api_shadow/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto b/generated_api_shadow/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto
new file mode 100644
index 000000000000..502a66893174
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/filters/network/sni_dynamic_forward_proxy/v3alpha/sni_dynamic_forward_proxy.proto
@@ -0,0 +1,37 @@
+syntax = "proto3";
+
+package envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha;
+
+import "envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.filters.network.sni_dynamic_forward_proxy.v3alpha";
+option java_outer_classname = "SniDynamicForwardProxyProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).work_in_progress = true;
+option (udpa.annotations.file_status).package_version_status = ACTIVE;
+
+// [#protodoc-title: SNI dynamic forward proxy]
+
+// Configuration for the SNI-based dynamic forward proxy filter. See the
+// :ref:`architecture overview ` for
+// more information. Note this filter must be configured along with
+// :ref:`TLS inspector listener filter `
+// to work.
+// [#extension: envoy.filters.network.sni_dynamic_forward_proxy]
+message FilterConfig {
+ // The DNS cache configuration that the filter will attach to. Note this
+ // configuration must match that of associated :ref:`dynamic forward proxy
+ // cluster configuration
+ // `.
+ common.dynamic_forward_proxy.v3.DnsCacheConfig dns_cache_config = 1
+ [(validate.rules).message = {required: true}];
+
+ oneof port_specifier {
+ // The port number to connect to the upstream.
+ uint32 port_value = 2 [(validate.rules).uint32 = {lte: 65535 gt: 0}];
+ }
+}
diff --git a/generated_api_shadow/envoy/extensions/tracers/datadog/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/tracers/datadog/v4alpha/BUILD
new file mode 100644
index 000000000000..d58bd8a0fca4
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/datadog/v4alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/generated_api_shadow/envoy/extensions/tracers/datadog/v4alpha/datadog.proto b/generated_api_shadow/envoy/extensions/tracers/datadog/v4alpha/datadog.proto
new file mode 100644
index 000000000000..94359ce837bf
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/datadog/v4alpha/datadog.proto
@@ -0,0 +1,27 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.datadog.v4alpha;
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.datadog.v4alpha";
+option java_outer_classname = "DatadogProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Datadog tracer]
+
+// Configuration for the Datadog tracer.
+// [#extension: envoy.tracers.datadog]
+message DatadogConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.DatadogConfig";
+
+ // The cluster to use for submitting traces to the Datadog agent.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The name used for the service when traces are generated by envoy.
+ string service_name = 2 [(validate.rules).string = {min_bytes: 1}];
+}
diff --git a/generated_api_shadow/envoy/extensions/tracers/dynamic_ot/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/tracers/dynamic_ot/v4alpha/BUILD
new file mode 100644
index 000000000000..d58bd8a0fca4
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/dynamic_ot/v4alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/generated_api_shadow/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto b/generated_api_shadow/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto
new file mode 100644
index 000000000000..d311304a3ddf
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/dynamic_ot/v4alpha/dynamic_ot.proto
@@ -0,0 +1,33 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.dynamic_ot.v4alpha;
+
+import "google/protobuf/struct.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.dynamic_ot.v4alpha";
+option java_outer_classname = "DynamicOtProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Dynamically loadable OpenTracing tracer]
+
+// DynamicOtConfig is used to dynamically load a tracer from a shared library
+// that implements the `OpenTracing dynamic loading API
+// `_.
+// [#extension: envoy.tracers.dynamic_ot]
+message DynamicOtConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.DynamicOtConfig";
+
+ // Dynamic library implementing the `OpenTracing API
+ // `_.
+ string library = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The configuration to use when creating a tracer from the given dynamic
+ // library.
+ google.protobuf.Struct config = 2;
+}
diff --git a/generated_api_shadow/envoy/extensions/tracers/lightstep/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/tracers/lightstep/v4alpha/BUILD
new file mode 100644
index 000000000000..d58bd8a0fca4
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/lightstep/v4alpha/BUILD
@@ -0,0 +1,12 @@
+# 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/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/generated_api_shadow/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto b/generated_api_shadow/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto
new file mode 100644
index 000000000000..93ea47ba6a10
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/lightstep/v4alpha/lightstep.proto
@@ -0,0 +1,47 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.lightstep.v4alpha;
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.lightstep.v4alpha";
+option java_outer_classname = "LightstepProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: LightStep tracer]
+
+// Configuration for the LightStep tracer.
+// [#extension: envoy.tracers.lightstep]
+message LightstepConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.LightstepConfig";
+
+ // Available propagation modes
+ enum PropagationMode {
+ // Propagate trace context in the single header x-ot-span-context.
+ ENVOY = 0;
+
+ // Propagate trace context using LightStep's native format.
+ LIGHTSTEP = 1;
+
+ // Propagate trace context using the b3 format.
+ B3 = 2;
+
+ // Propagation trace context using the w3 trace-context standard.
+ TRACE_CONTEXT = 3;
+ }
+
+ // The cluster manager cluster that hosts the LightStep collectors.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // File containing the access token to the `LightStep
+ // `_ API.
+ string access_token_file = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Propagation modes to use by LightStep's tracer.
+ repeated PropagationMode propagation_modes = 3
+ [(validate.rules).repeated = {items {enum {defined_only: true}}}];
+}
diff --git a/generated_api_shadow/envoy/extensions/tracers/opencensus/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/tracers/opencensus/v4alpha/BUILD
new file mode 100644
index 000000000000..05e29893b9cf
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/opencensus/v4alpha/BUILD
@@ -0,0 +1,14 @@
+# 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/config/core/v4alpha:pkg",
+ "//envoy/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ "@opencensus_proto//opencensus/proto/trace/v1:trace_config_proto",
+ ],
+)
diff --git a/generated_api_shadow/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto b/generated_api_shadow/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto
new file mode 100644
index 000000000000..f64507b13827
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/opencensus/v4alpha/opencensus.proto
@@ -0,0 +1,97 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.opencensus.v4alpha;
+
+import "envoy/config/core/v4alpha/grpc_service.proto";
+
+import "opencensus/proto/trace/v1/trace_config.proto";
+
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.opencensus.v4alpha";
+option java_outer_classname = "OpencensusProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: OpenCensus tracer]
+
+// Configuration for the OpenCensus tracer.
+// [#next-free-field: 15]
+// [#extension: envoy.tracers.opencensus]
+message OpenCensusConfig {
+ option (udpa.annotations.versioning).previous_message_type =
+ "envoy.config.trace.v3.OpenCensusConfig";
+
+ enum TraceContext {
+ // No-op default, no trace context is utilized.
+ NONE = 0;
+
+ // W3C Trace-Context format "traceparent:" header.
+ TRACE_CONTEXT = 1;
+
+ // Binary "grpc-trace-bin:" header.
+ GRPC_TRACE_BIN = 2;
+
+ // "X-Cloud-Trace-Context:" header.
+ CLOUD_TRACE_CONTEXT = 3;
+
+ // X-B3-* headers.
+ B3 = 4;
+ }
+
+ reserved 7;
+
+ // Configures tracing, e.g. the sampler, max number of annotations, etc.
+ .opencensus.proto.trace.v1.TraceConfig trace_config = 1;
+
+ // Enables the stdout exporter if set to true. This is intended for debugging
+ // purposes.
+ bool stdout_exporter_enabled = 2;
+
+ // Enables the Stackdriver exporter if set to true. The project_id must also
+ // be set.
+ bool stackdriver_exporter_enabled = 3;
+
+ // The Cloud project_id to use for Stackdriver tracing.
+ string stackdriver_project_id = 4;
+
+ // (optional) By default, the Stackdriver exporter will connect to production
+ // Stackdriver. If stackdriver_address is non-empty, it will instead connect
+ // to this address, which is in the gRPC format:
+ // https://github.com/grpc/grpc/blob/master/doc/naming.md
+ string stackdriver_address = 10;
+
+ // (optional) The gRPC server that hosts Stackdriver tracing service. Only
+ // Google gRPC is supported. If :ref:`target_uri `
+ // is not provided, the default production Stackdriver address will be used.
+ config.core.v4alpha.GrpcService stackdriver_grpc_service = 13;
+
+ // Enables the Zipkin exporter if set to true. The url and service name must
+ // also be set.
+ bool zipkin_exporter_enabled = 5;
+
+ // The URL to Zipkin, e.g. "http://127.0.0.1:9411/api/v2/spans"
+ string zipkin_url = 6;
+
+ // Enables the OpenCensus Agent exporter if set to true. The ocagent_address or
+ // ocagent_grpc_service must also be set.
+ bool ocagent_exporter_enabled = 11;
+
+ // The address of the OpenCensus Agent, if its exporter is enabled, in gRPC
+ // format: https://github.com/grpc/grpc/blob/master/doc/naming.md
+ // [#comment:TODO: deprecate this field]
+ string ocagent_address = 12;
+
+ // (optional) The gRPC server hosted by the OpenCensus Agent. Only Google gRPC is supported.
+ // This is only used if the ocagent_address is left empty.
+ config.core.v4alpha.GrpcService ocagent_grpc_service = 14;
+
+ // List of incoming trace context headers we will accept. First one found
+ // wins.
+ repeated TraceContext incoming_trace_context = 8;
+
+ // List of outgoing trace context headers we will produce.
+ repeated TraceContext outgoing_trace_context = 9;
+}
diff --git a/generated_api_shadow/envoy/extensions/tracers/xray/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/tracers/xray/v4alpha/BUILD
new file mode 100644
index 000000000000..d8ce683c41d6
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/xray/v4alpha/BUILD
@@ -0,0 +1,13 @@
+# 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/config/core/v4alpha:pkg",
+ "//envoy/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/api/envoy/config/trace/v4alpha/xray.proto b/generated_api_shadow/envoy/extensions/tracers/xray/v4alpha/xray.proto
similarity index 82%
rename from api/envoy/config/trace/v4alpha/xray.proto
rename to generated_api_shadow/envoy/extensions/tracers/xray/v4alpha/xray.proto
index 39bcebd1bad7..27a9b5407dda 100644
--- a/api/envoy/config/trace/v4alpha/xray.proto
+++ b/generated_api_shadow/envoy/extensions/tracers/xray/v4alpha/xray.proto
@@ -1,6 +1,6 @@
syntax = "proto3";
-package envoy.config.trace.v4alpha;
+package envoy.extensions.tracers.xray.v4alpha;
import "envoy/config/core/v4alpha/address.proto";
import "envoy/config/core/v4alpha/base.proto";
@@ -9,7 +9,7 @@ import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
-option java_package = "io.envoyproxy.envoy.config.trace.v4alpha";
+option java_package = "io.envoyproxy.envoy.extensions.tracers.xray.v4alpha";
option java_outer_classname = "XrayProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
@@ -22,7 +22,7 @@ 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.
- core.v4alpha.SocketAddress daemon_endpoint = 1;
+ config.core.v4alpha.SocketAddress daemon_endpoint = 1;
// The name of the X-Ray segment.
string segment_name = 2 [(validate.rules).string = {min_len: 1}];
@@ -31,5 +31,5 @@ message XRayConfig {
// For an example of the sampling rules see:
// `X-Ray SDK documentation
// `_
- core.v4alpha.DataSource sampling_rule_manifest = 3;
+ config.core.v4alpha.DataSource sampling_rule_manifest = 3;
}
diff --git a/generated_api_shadow/envoy/extensions/tracers/zipkin/v4alpha/BUILD b/generated_api_shadow/envoy/extensions/tracers/zipkin/v4alpha/BUILD
new file mode 100644
index 000000000000..8e8f00da8af0
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/zipkin/v4alpha/BUILD
@@ -0,0 +1,13 @@
+# 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/annotations:pkg",
+ "//envoy/config/trace/v3:pkg",
+ "@com_github_cncf_udpa//udpa/annotations:pkg",
+ ],
+)
diff --git a/generated_api_shadow/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto b/generated_api_shadow/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto
new file mode 100644
index 000000000000..4207546ff701
--- /dev/null
+++ b/generated_api_shadow/envoy/extensions/tracers/zipkin/v4alpha/zipkin.proto
@@ -0,0 +1,68 @@
+syntax = "proto3";
+
+package envoy.extensions.tracers.zipkin.v4alpha;
+
+import "google/protobuf/wrappers.proto";
+
+import "envoy/annotations/deprecation.proto";
+import "udpa/annotations/status.proto";
+import "udpa/annotations/versioning.proto";
+import "validate/validate.proto";
+
+option java_package = "io.envoyproxy.envoy.extensions.tracers.zipkin.v4alpha";
+option java_outer_classname = "ZipkinProto";
+option java_multiple_files = true;
+option (udpa.annotations.file_status).package_version_status = NEXT_MAJOR_VERSION_CANDIDATE;
+
+// [#protodoc-title: Zipkin tracer]
+
+// Configuration for the Zipkin tracer.
+// [#extension: envoy.tracers.zipkin]
+// [#next-free-field: 6]
+message ZipkinConfig {
+ option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v3.ZipkinConfig";
+
+ // Available Zipkin collector endpoint versions.
+ enum CollectorEndpointVersion {
+ // Zipkin API v1, JSON over HTTP.
+ // [#comment: The default implementation of Zipkin client before this field is added was only v1
+ // and the way user configure this was by not explicitly specifying the version. Consequently,
+ // before this is added, the corresponding Zipkin collector expected to receive v1 payload.
+ // Hence the motivation of adding HTTP_JSON_V1 as the default is to avoid a breaking change when
+ // user upgrading Envoy with this change. Furthermore, we also immediately deprecate this field,
+ // since in Zipkin realm this v1 version is considered to be not preferable anymore.]
+ hidden_envoy_deprecated_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0
+ [deprecated = true, (envoy.annotations.disallowed_by_default_enum) = true];
+
+ // Zipkin API v2, JSON over HTTP.
+ HTTP_JSON = 1;
+
+ // Zipkin API v2, protobuf over HTTP.
+ HTTP_PROTO = 2;
+
+ // [#not-implemented-hide:]
+ GRPC = 3;
+ }
+
+ // The cluster manager cluster that hosts the Zipkin collectors. Note that the
+ // Zipkin cluster must be defined in the :ref:`Bootstrap static cluster
+ // resources `.
+ string collector_cluster = 1 [(validate.rules).string = {min_bytes: 1}];
+
+ // The API endpoint of the Zipkin service where the spans will be sent. When
+ // using a standard Zipkin installation, the API endpoint is typically
+ // /api/v1/spans, which is the default value.
+ string collector_endpoint = 2 [(validate.rules).string = {min_bytes: 1}];
+
+ // Determines whether a 128bit trace id will be used when creating a new
+ // trace instance. The default value is false, which will result in a 64 bit trace id being used.
+ bool trace_id_128bit = 3;
+
+ // Determines whether client and server spans will share the same span context.
+ // The default value is true.
+ google.protobuf.BoolValue shared_span_context = 4;
+
+ // Determines the selected collector endpoint version. By default, the ``HTTP_JSON_V1`` will be
+ // used.
+ CollectorEndpointVersion collector_endpoint_version = 5;
+}
diff --git a/include/envoy/grpc/context.h b/include/envoy/grpc/context.h
index 191a2583cb9e..1f2d2469e5d8 100644
--- a/include/envoy/grpc/context.h
+++ b/include/envoy/grpc/context.h
@@ -84,6 +84,16 @@ class Context {
const absl::optional& request_names,
uint64_t amount) PURE;
+ /**
+ * Charge upstream stat to a cluster/service/method.
+ * @param cluster supplies the target cluster.
+ * @param request_names supplies the request names.
+ * @param duration supplies the duration of the upstream request.
+ */
+ virtual void chargeUpstreamStat(const Upstream::ClusterInfo& cluster,
+ const absl::optional& request_names,
+ std::chrono::milliseconds duration) PURE;
+
/**
* @return a struct containing StatNames for gRPC stat tokens.
*/
diff --git a/include/envoy/http/context.h b/include/envoy/http/context.h
index 73d05abd463e..a9d5ac5c9315 100644
--- a/include/envoy/http/context.h
+++ b/include/envoy/http/context.h
@@ -2,7 +2,7 @@
#include
-#include "envoy/config/trace/v3/trace.pb.h"
+#include "envoy/config/trace/v3/http_tracer.pb.h"
#include "envoy/http/codes.h"
namespace Envoy {
diff --git a/include/envoy/network/connection_handler.h b/include/envoy/network/connection_handler.h
index eefb69e7dd96..b8787df14ef8 100644
--- a/include/envoy/network/connection_handler.h
+++ b/include/envoy/network/connection_handler.h
@@ -38,10 +38,12 @@ class ConnectionHandler {
virtual void decNumConnections() PURE;
/**
- * Adds a listener to the handler.
+ * Adds a listener to the handler, optionally replacing the existing listener.
+ * @param overridden_listener tag of the existing listener. nullopt if no previous listener.
* @param config listener configuration options.
*/
- virtual void addListener(ListenerConfig& config) PURE;
+ virtual void addListener(absl::optional overridden_listener,
+ ListenerConfig& config) PURE;
/**
* Remove listeners using the listener tag as a key. All connections owned by the removed
@@ -50,6 +52,17 @@ class ConnectionHandler {
*/
virtual void removeListeners(uint64_t listener_tag) PURE;
+ /**
+ * Remove the filter chains and the connections in the listener. All connections owned
+ * by the filter chains will be closed. Once all the connections are destroyed(connections
+ * could be deferred deleted!), invoke the completion.
+ * @param listener_tag supplies the tag passed to addListener().
+ * @param filter_chains supplies the filter chains to be removed.
+ */
+ virtual void removeFilterChains(uint64_t listener_tag,
+ const std::list& filter_chains,
+ std::function completion) PURE;
+
/**
* Stop listeners using the listener tag as a key. This will not close any connections and is used
* for draining.
diff --git a/include/envoy/server/instance.h b/include/envoy/server/instance.h
index 83996f09db05..1e6335962e71 100644
--- a/include/envoy/server/instance.h
+++ b/include/envoy/server/instance.h
@@ -7,7 +7,7 @@
#include "envoy/access_log/access_log.h"
#include "envoy/api/api.h"
#include "envoy/common/mutex_tracer.h"
-#include "envoy/config/trace/v3/trace.pb.h"
+#include "envoy/config/trace/v3/http_tracer.pb.h"
#include "envoy/event/timer.h"
#include "envoy/grpc/context.h"
#include "envoy/http/context.h"
diff --git a/include/envoy/server/worker.h b/include/envoy/server/worker.h
index 474e844a0821..c2f273044150 100644
--- a/include/envoy/server/worker.h
+++ b/include/envoy/server/worker.h
@@ -24,12 +24,16 @@ class Worker {
using AddListenerCompletion = std::function;
/**
- * Add a listener to the worker.
+ * Add a listener to the worker and replace the previous listener if any. If the previous listener
+ * doesn't exist, the behavior should be equivalent to add a new listener.
+ * @param overridden_listener The previous listener tag to be replaced. nullopt if it's a new
+ * listener.
* @param listener supplies the listener to add.
* @param completion supplies the completion to call when the listener has been added (or not) on
* the worker.
*/
- virtual void addListener(Network::ListenerConfig& listener,
+ virtual void addListener(absl::optional overridden_listener,
+ Network::ListenerConfig& listener,
AddListenerCompletion completion) PURE;
/**
@@ -63,6 +67,17 @@ class Worker {
*/
virtual void removeListener(Network::ListenerConfig& listener,
std::function completion) PURE;
+ /**
+ * Remove the stale filter chains of the given listener but leave the listener running.
+ * @param listener_tag supplies the tag passed to addListener().
+ * @param filter_chains supplies the filter chains to be removed.
+ * @param completion supplies the completion to be called when the listener removed all the
+ * untracked connections. This completion is called on the worker thread. No locking is performed
+ * by the worker.
+ */
+ virtual void removeFilterChains(uint64_t listener_tag,
+ const std::list& filter_chains,
+ std::function completion) PURE;
/**
* Stop a listener from accepting new connections. This is used for server draining.
diff --git a/include/envoy/stats/allocator.h b/include/envoy/stats/allocator.h
index 681befa5f3b3..f6181553ad85 100644
--- a/include/envoy/stats/allocator.h
+++ b/include/envoy/stats/allocator.h
@@ -32,8 +32,7 @@ class Allocator {
* @param name the full name of the stat.
* @param tag_extracted_name the name of the stat with tag-values stripped out.
* @param tags the tag values.
- * @return CounterSharedPtr a counter, or nullptr if allocation failed, in which case
- * tag_extracted_name and tags are not moved.
+ * @return CounterSharedPtr a counter.
*/
virtual CounterSharedPtr makeCounter(StatName name, StatName tag_extracted_name,
const StatNameTagVector& stat_name_tags) PURE;
@@ -42,13 +41,20 @@ class Allocator {
* @param name the full name of the stat.
* @param tag_extracted_name the name of the stat with tag-values stripped out.
* @param stat_name_tags the tag values.
- * @return GaugeSharedPtr a gauge, or nullptr if allocation failed, in which case
- * tag_extracted_name and tags are not moved.
+ * @return GaugeSharedPtr a gauge.
*/
virtual GaugeSharedPtr makeGauge(StatName name, StatName tag_extracted_name,
const StatNameTagVector& stat_name_tags,
Gauge::ImportMode import_mode) PURE;
+ /**
+ * @param name the full name of the stat.
+ * @param tag_extracted_name the name of the stat with tag-values stripped out.
+ * @param tags the tag values.
+ * @return TextReadoutSharedPtr a text readout.
+ */
+ virtual TextReadoutSharedPtr makeTextReadout(StatName name, StatName tag_extracted_name,
+ const StatNameTagVector& stat_name_tags) PURE;
virtual const SymbolTable& constSymbolTable() const PURE;
virtual SymbolTable& symbolTable() PURE;
diff --git a/include/envoy/stats/scope.h b/include/envoy/stats/scope.h
index 03a232063c13..408655bbb8a5 100644
--- a/include/envoy/stats/scope.h
+++ b/include/envoy/stats/scope.h
@@ -17,12 +17,14 @@ namespace Stats {
class Counter;
class Gauge;
class Histogram;
-class Scope;
class NullGaugeImpl;
+class Scope;
+class TextReadout;
using CounterOptConstRef = absl::optional>;
using GaugeOptConstRef = absl::optional>;
using HistogramOptConstRef = absl::optional>;
+using TextReadoutOptConstRef = absl::optional>;
using ScopePtr = std::unique_ptr;
using ScopeSharedPtr = std::shared_ptr;
@@ -136,6 +138,32 @@ class Scope {
*/
virtual Histogram& histogramFromString(const std::string& name, Histogram::Unit unit) PURE;
+ /**
+ * Creates a TextReadout from the stat name. Tag extraction will be performed on the name.
+ * @param name The name of the stat, obtained from the SymbolTable.
+ * @return a text readout within the scope's namespace.
+ */
+ TextReadout& textReadoutFromStatName(const StatName& name) {
+ return textReadoutFromStatNameWithTags(name, absl::nullopt);
+ }
+
+ /**
+ * Creates a TextReadout from the stat name and tags. If tags are not provided, tag extraction
+ * will be performed on the name.
+ * @param name The name of the stat, obtained from the SymbolTable.
+ * @param tags optionally specified tags.
+ * @return a text readout within the scope's namespace.
+ */
+ virtual TextReadout& textReadoutFromStatNameWithTags(const StatName& name,
+ StatNameTagVectorOptConstRef tags) PURE;
+
+ /**
+ * TODO(#6667): this variant is deprecated: use textReadoutFromStatName.
+ * @param name The name, expressed as a string.
+ * @return a text readout within the scope's namespace.
+ */
+ virtual TextReadout& textReadoutFromString(const std::string& name) PURE;
+
/**
* @param The name of the stat, obtained from the SymbolTable.
* @return a reference to a counter within the scope's namespace, if it exists.
@@ -155,6 +183,12 @@ class Scope {
*/
virtual HistogramOptConstRef findHistogram(StatName name) const PURE;
+ /**
+ * @param The name of the stat, obtained from the SymbolTable.
+ * @return a reference to a text readout within the scope's namespace, if it exists.
+ */
+ virtual TextReadoutOptConstRef findTextReadout(StatName name) const PURE;
+
/**
* @return a reference to the symbol table.
*/
diff --git a/include/envoy/stats/sink.h b/include/envoy/stats/sink.h
index d58ea33220fa..f0ce08c1dd05 100644
--- a/include/envoy/stats/sink.h
+++ b/include/envoy/stats/sink.h
@@ -35,6 +35,7 @@ class MetricSnapshot {
* @return a snapshot of all histograms.
*/
virtual const std::vector>& histograms() PURE;
+ // TODO(efimki): Add support of text readouts stats.
};
/**
diff --git a/include/envoy/stats/stats.h b/include/envoy/stats/stats.h
index b1772fb63212..c723152ab549 100644
--- a/include/envoy/stats/stats.h
+++ b/include/envoy/stats/stats.h
@@ -156,5 +156,32 @@ class Gauge : public Metric {
using GaugeSharedPtr = RefcountPtr;
+/**
+ * A string, possibly non-ASCII.
+ */
+class TextReadout : public virtual Metric {
+public:
+ // Text readout type is used internally to disambiguate isolated store
+ // constructors. In the future we can extend it to specify text encoding or
+ // some such.
+ enum class Type {
+ Default, // No particular meaning.
+ };
+
+ ~TextReadout() override = default;
+
+ /**
+ * Sets the value of this TextReadout by moving the input |value| to minimize
+ * buffer copies under the lock.
+ */
+ virtual void set(std::string&& value) PURE;
+ /**
+ * @return the copy of this TextReadout value.
+ */
+ virtual std::string value() const PURE;
+};
+
+using TextReadoutSharedPtr = RefcountPtr