From a8a27127d59a8354048d872198f3a860055b5d6c Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Tue, 27 Sep 2022 01:53:08 +0000 Subject: [PATCH] zipkin tracing: support to make the envoy as the independent hop for tracing (#22987) * zipkin tracing: support to make the envoy as the independent hop for tracing Signed-off-by: wbpcode * fix test Signed-off-by: wbpcode * simply impl Signed-off-by: wbpcode * Update source/extensions/tracers/zipkin/tracer.cc Co-authored-by: Adi (Suissa) Peleg * Update source/extensions/tracers/zipkin/tracer.cc Co-authored-by: Adi (Suissa) Peleg * minor update of comments Signed-off-by: wbpcode * Update api/envoy/config/trace/v3/zipkin.proto Co-authored-by: Adi (Suissa) Peleg Signed-off-by: code * Update api/envoy/config/trace/v3/zipkin.proto Co-authored-by: Adi (Suissa) Peleg Signed-off-by: code * Update changelogs/current.yaml Co-authored-by: Adi (Suissa) Peleg Signed-off-by: code * add attention Signed-off-by: wbpcode * rename the api and add more comment Signed-off-by: wbpcode * fix format Signed-off-by: wbpcode * fix format Signed-off-by: wbpcode * Update api/envoy/config/trace/v3/zipkin.proto Co-authored-by: Adi (Suissa) Peleg Signed-off-by: code * address comment Signed-off-by: wbpcode * Update source/extensions/tracers/zipkin/tracer.cc Co-authored-by: Adi (Suissa) Peleg Signed-off-by: code * fix format Signed-off-by: wbpcode Signed-off-by: wbpcode Signed-off-by: code Co-authored-by: Adi (Suissa) Peleg Mirrored from https://github.com/envoyproxy/envoy @ ad800292a630c273fb548ac6d320522ffdbd2a8a --- envoy/config/trace/v3/zipkin.proto | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/envoy/config/trace/v3/zipkin.proto b/envoy/config/trace/v3/zipkin.proto index 1d76b813..96556c7b 100644 --- a/envoy/config/trace/v3/zipkin.proto +++ b/envoy/config/trace/v3/zipkin.proto @@ -21,7 +21,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // Configuration for the Zipkin tracer. // [#extension: envoy.tracers.zipkin] -// [#next-free-field: 7] +// [#next-free-field: 8] message ZipkinConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.trace.v2.ZipkinConfig"; @@ -68,4 +68,19 @@ message ZipkinConfig { // Optional hostname to use when sending spans to the collector_cluster. Useful for collectors // that require a specific hostname. Defaults to :ref:`collector_cluster ` above. string collector_hostname = 6; + + // If this is set to true, then Envoy will be treated as an independent hop in trace chain. A complete span pair will be created for a single + // request. Server span will be created for the downstream request and client span will be created for the related upstream request. + // This should be set to true in the following cases: + // + // * The Envoy Proxy is used as gateway or ingress. + // * The Envoy Proxy is used as sidecar but inbound traffic capturing or outbound traffic capturing is disabled. + // * Any case that the `start_child_span of router ` is set to true. + // + // .. attention:: + // + // If this is set to true, then the + // :ref:`start_child_span of router ` + // SHOULD be set to true also to ensure the correctness of trace chain. + bool split_spans_for_request = 7; }