diff --git a/api/envoy/config/trace/v3/dynamic_ot.proto b/api/envoy/config/trace/v3/dynamic_ot.proto index 35971f30dfbdc..d2664ef717e62 100644 --- a/api/envoy/config/trace/v3/dynamic_ot.proto +++ b/api/envoy/config/trace/v3/dynamic_ot.proto @@ -33,11 +33,15 @@ message DynamicOtConfig { string library = 1 [ deprecated = true, (validate.rules).string = {min_len: 1}, - (envoy.annotations.deprecated_at_minor_version) = "3.0" + (envoy.annotations.deprecated_at_minor_version) = "3.0", + (envoy.annotations.disallowed_by_default) = true ]; // The configuration to use when creating a tracer from the given dynamic // library. - google.protobuf.Struct config = 2 - [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; + google.protobuf.Struct config = 2 [ + deprecated = true, + (envoy.annotations.deprecated_at_minor_version) = "3.0", + (envoy.annotations.disallowed_by_default) = true + ]; } diff --git a/docs/root/start/sandboxes/index.rst b/docs/root/start/sandboxes/index.rst index d23d536c24477..450fd5176fd2e 100644 --- a/docs/root/start/sandboxes/index.rst +++ b/docs/root/start/sandboxes/index.rst @@ -59,7 +59,6 @@ The following sandboxes are available: golang-network grpc_bridge gzip - jaeger_native_tracing jaeger_tracing kafka load_reporting_service diff --git a/docs/root/start/sandboxes/jaeger_native_tracing.rst b/docs/root/start/sandboxes/jaeger_native_tracing.rst deleted file mode 100644 index 5b1295ffba6c7..0000000000000 --- a/docs/root/start/sandboxes/jaeger_native_tracing.rst +++ /dev/null @@ -1,121 +0,0 @@ -.. _install_sandboxes_jaeger_native_tracing: - -Jaeger native tracing -===================== - -.. sidebar:: Requirements - - .. include:: _include/docker-env-setup-link.rst - - :ref:`curl ` - Used to make ``HTTP`` requests. - -.. sidebar:: Compatibility - - The jaeger native tracing sandbox uses a binary built for ``x86_64``, and will therefore - only work on that architecture. - -The Jaeger tracing sandbox demonstrates Envoy's :ref:`request tracing ` -capabilities using `Jaeger `_ as the tracing provider and Jaeger's native -`C++ client `_ as a plugin. Using Jaeger with its -native client instead of with Envoy's builtin Zipkin client has the following advantages: - -- Trace propagation will work with the other services using Jaeger without needing to make - configuration `changes `_. -- A variety of different `sampling strategies `_ - can be used, including probabilistic or remote where sampling can be centrally controlled from Jaeger's backend. -- Spans are sent to the collector in a more efficient binary encoding. - -This sandbox is very similar to the front proxy architecture described above, with one difference: -service1 makes an API call to service2 before returning a response. -The three containers will be deployed inside a virtual network called ``envoymesh``. - -All incoming requests are routed via the front Envoy, which is acting as a reverse proxy -sitting on the edge of the ``envoymesh`` network. Port ``8000`` is exposed -by docker compose (see :download:`docker-compose.yaml <_include/jaeger-native-tracing/docker-compose.yaml>`). Notice that -all Envoys are configured to collect request traces (e.g., http_connection_manager/config/tracing setup in -:download:`envoy.yaml <_include/jaeger-native-tracing/envoy.yaml>`) and setup to propagate the spans generated -by the Jaeger tracer to a Jaeger cluster (trace driver setup -in :download:`envoy.yaml <_include/jaeger-native-tracing/envoy.yaml>`). - -Before routing a request to the appropriate service Envoy or the application, Envoy will take -care of generating the appropriate spans for tracing (parent/child context spans). -At a high-level, each span records the latency of upstream API calls as well as information -needed to correlate the span with other related spans (e.g., the trace ID). - -One of the most important benefits of tracing from Envoy is that it will take care of -propagating the traces to the Jaeger service cluster. However, in order to fully take advantage -of tracing, the application has to propagate trace headers that Envoy generates, while making -calls to other services. In the sandbox we have provided, the simple ``aiohttp`` app -(see trace function in :download:`examples/shared/python/tracing/service.py <_include/shared/python/tracing/service.py>`) acting as service1 propagates -the trace headers while making an outbound call to service2. - -Step 3: Build the sandbox -************************* - -To build this sandbox example, and start the example apps run the following commands: - -.. code-block:: console - - $ pwd - envoy/examples/jaeger-native-tracing - $ docker compose pull - $ docker compose up --build -d - $ docker compose ps - - Name Command State Ports - ------------------------------------------------------------------------------------------------------------------------------------------------------------------- - jaeger-native-tracing_front-envoy_1 /start-front.sh Up 10000/tcp, 0.0.0.0:8000->8000/tcp - jaeger-native-tracing_jaeger_1 /go/bin/all-in-one-linux - ... Up 14250/tcp, 14268/tcp, 0.0.0.0:16686->16686/tcp, 5775/udp, 5778/tcp, 6831/udp, 6832/udp - jaeger-native-tracing_service1_1 /start-service.sh Up 10000/tcp - jaeger-native-tracing_service2_1 /start-service.sh Up 10000/tcp - -Step 4: Generate some load -************************** - -You can now send a request to service1 via the front-envoy as follows: - -.. code-block:: console - - $ curl -v localhost:8000/trace/1 - * Trying 192.168.99.100... - * Connected to 192.168.99.100 (192.168.99.100) port 8000 (#0) - > GET /trace/1 HTTP/1.1 - > Host: 192.168.99.100:8000 - > User-Agent: curl/7.54.0 - > Accept: */* - > - < HTTP/1.1 200 OK - < content-type: text/html; charset=utf-8 - < content-length: 89 - < x-envoy-upstream-service-time: 9 - < server: envoy - < date: Fri, 26 Aug 2018 19:39:19 GMT - < - Hello from behind Envoy (service 1)! hostname: f26027f1ce28 resolvedhostname: 172.19.0.6 - * Connection #0 to host 192.168.99.100 left intact - -Step 5: View the traces in Jaeger UI -************************************ - -Point your browser to http://localhost:16686 . You should see the Jaeger dashboard. -Set the service to "front-proxy" and hit 'Find Traces'. You should see traces from the front-proxy. -Click on a trace to explore the path taken by the request from front-proxy to service1 -to service2, as well as the latency incurred at each hop. - -.. seealso:: - - :ref:`Request tracing ` - Learn more about using Envoy's request tracing. - - `Jaeger `_ - Jaeger tracing website. - - `Jaeger C++ client `_ - The Jaeger C++ cient. - - `Jaeger Go client `_ - The Jaeger Go client. - - `Jaeger sampling strategies `_ - More information about Jaeger sampling strategies. diff --git a/docs/root/start/sandboxes/jaeger_tracing.rst b/docs/root/start/sandboxes/jaeger_tracing.rst index f9ac3bc2a6b5b..83c5bbf3a6210 100644 --- a/docs/root/start/sandboxes/jaeger_tracing.rst +++ b/docs/root/start/sandboxes/jaeger_tracing.rst @@ -94,8 +94,5 @@ to service2, as well as the latency incurred at each hop. :ref:`Request tracing ` Learn more about using Envoy's request tracing. - :ref:`Jaeger native tracing sandbox ` - An example of using Jaeger natively with Envoy. - `Jaeger `_ Jaeger tracing website. diff --git a/examples/jaeger-native-tracing/README.md b/examples/jaeger-native-tracing/README.md deleted file mode 100644 index e21ecf00ca08b..0000000000000 --- a/examples/jaeger-native-tracing/README.md +++ /dev/null @@ -1,2 +0,0 @@ -To learn about this sandbox and for instructions on how to run it please head over -to the [envoy docs](https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/jaeger_native_tracing) diff --git a/examples/jaeger-native-tracing/docker-compose.yaml b/examples/jaeger-native-tracing/docker-compose.yaml deleted file mode 100644 index 4279e0339ed78..0000000000000 --- a/examples/jaeger-native-tracing/docker-compose.yaml +++ /dev/null @@ -1,44 +0,0 @@ -services: - - # jaeger - front-envoy: - build: - context: . - dockerfile: ../shared/envoy/Dockerfile - target: envoy-jaeger-native - depends_on: - service1: - condition: service_healthy - service2: - condition: service_healthy - jaeger: - condition: service_healthy - ports: - - "${PORT_PROXY:-10000}:8000" - - service1: - build: - context: ../shared/python - target: aiohttp-jaeger-service - volumes: - - ./service1-envoy-jaeger.yaml:/etc/service-envoy.yaml - environment: - - SERVICE_NAME=1 - - service2: - build: - context: ../shared/python - target: aiohttp-jaeger-service - volumes: - - ./service2-envoy-jaeger.yaml:/etc/service-envoy.yaml - environment: - - SERVICE_NAME=2 - - jaeger: - build: - context: . - dockerfile: ../shared/jaeger/Dockerfile - environment: - - COLLECTOR_ZIPKIN_HOST_PORT=9411 - ports: - - "${PORT_UI:-10000}:16686" diff --git a/examples/jaeger-native-tracing/envoy.yaml b/examples/jaeger-native-tracing/envoy.yaml deleted file mode 100644 index 3ee3d6944ebed..0000000000000 --- a/examples/jaeger-native-tracing/envoy.yaml +++ /dev/null @@ -1,69 +0,0 @@ -node: - cluster: front-proxy - -static_resources: - listeners: - - address: - socket_address: - address: 0.0.0.0 - port_value: 8000 - traffic_direction: OUTBOUND - filter_chains: - - filters: - - name: envoy.filters.network.http_connection_manager - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager - generate_request_id: true - tracing: - provider: - name: envoy.tracers.dynamic_ot - typed_config: - "@type": type.googleapis.com/envoy.config.trace.v3.DynamicOtConfig - library: /usr/local/lib/libjaegertracing_plugin.so - config: - service_name: front-proxy - sampler: - type: const - param: 1 - reporter: - localAgentHostPort: jaeger:6831 - headers: - jaegerDebugHeader: jaeger-debug-id - jaegerBaggageHeader: jaeger-baggage - traceBaggageHeaderPrefix: uberctx- - baggage_restrictions: - denyBaggageOnInitializationFailure: false - hostPort: "" - codec_type: auto - stat_prefix: ingress_http - route_config: - name: local_route - virtual_hosts: - - name: backend - domains: - - "*" - routes: - - match: - prefix: "/" - route: - cluster: service1 - decorator: - operation: checkAvailability - http_filters: - - name: envoy.filters.http.router - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router - use_remote_address: true - clusters: - - name: service1 - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: service1 - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: service1 - port_value: 8000 diff --git a/examples/jaeger-native-tracing/install-jaeger-plugin.sh b/examples/jaeger-native-tracing/install-jaeger-plugin.sh deleted file mode 100755 index 74576be5247eb..0000000000000 --- a/examples/jaeger-native-tracing/install-jaeger-plugin.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -JAEGER_VERSION=v0.4.2 -curl -Lo /usr/local/lib/libjaegertracing_plugin.so https://github.com/jaegertracing/jaeger-client-cpp/releases/download/$JAEGER_VERSION/libjaegertracing_plugin.linux_amd64.so diff --git a/examples/jaeger-native-tracing/service1-envoy-jaeger.yaml b/examples/jaeger-native-tracing/service1-envoy-jaeger.yaml deleted file mode 100644 index 2c619d6498499..0000000000000 --- a/examples/jaeger-native-tracing/service1-envoy-jaeger.yaml +++ /dev/null @@ -1,105 +0,0 @@ -static_resources: - listeners: - - address: - socket_address: - address: 0.0.0.0 - port_value: 8000 - traffic_direction: INBOUND - filter_chains: - - filters: - - name: envoy.filters.network.http_connection_manager - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager - codec_type: auto - stat_prefix: ingress_http - route_config: - name: service1_route - virtual_hosts: - - name: service1 - domains: - - "*" - routes: - - match: - prefix: "/" - route: - cluster: local_service - decorator: - operation: checkAvailability - http_filters: - - name: envoy.filters.http.router - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router - - address: - socket_address: - address: 0.0.0.0 - port_value: 9000 - traffic_direction: OUTBOUND - filter_chains: - - filters: - - name: envoy.filters.network.http_connection_manager - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager - tracing: - provider: - name: envoy.tracers.dynamic_ot - typed_config: - "@type": type.googleapis.com/envoy.config.trace.v3.DynamicOtConfig - library: /usr/local/lib/libjaegertracing_plugin.so - config: - service_name: service1 - sampler: - type: const - param: 1 - reporter: - localAgentHostPort: jaeger:6831 - headers: - jaegerDebugHeader: jaeger-debug-id - jaegerBaggageHeader: jaeger-baggage - traceBaggageHeaderPrefix: uberctx- - baggage_restrictions: - denyBaggageOnInitializationFailure: false - hostPort: "" - codec_type: auto - stat_prefix: egress_http - route_config: - name: service2_route - virtual_hosts: - - name: service2 - domains: - - "*" - routes: - - match: - prefix: "/trace/2" - route: - cluster: service2 - decorator: - operation: checkStock - http_filters: - - name: envoy.filters.http.router - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router - clusters: - - name: local_service - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: local_service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: 127.0.0.1 - port_value: 8080 - - name: service2 - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: service2 - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: service2 - port_value: 8000 diff --git a/examples/jaeger-native-tracing/service2-envoy-jaeger.yaml b/examples/jaeger-native-tracing/service2-envoy-jaeger.yaml deleted file mode 100644 index d0640d85e558c..0000000000000 --- a/examples/jaeger-native-tracing/service2-envoy-jaeger.yaml +++ /dev/null @@ -1,64 +0,0 @@ -static_resources: - listeners: - - address: - socket_address: - address: 0.0.0.0 - port_value: 8000 - traffic_direction: INBOUND - filter_chains: - - filters: - - name: envoy.filters.network.http_connection_manager - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager - tracing: - provider: - name: envoy.tracers.dynamic_ot - typed_config: - "@type": type.googleapis.com/envoy.config.trace.v3.DynamicOtConfig - library: /usr/local/lib/libjaegertracing_plugin.so - config: - service_name: service2 - sampler: - type: const - param: 1 - reporter: - localAgentHostPort: jaeger:6831 - headers: - jaegerDebugHeader: jaeger-debug-id - jaegerBaggageHeader: jaeger-baggage - traceBaggageHeaderPrefix: uberctx- - baggage_restrictions: - denyBaggageOnInitializationFailure: false - hostPort: "" - codec_type: auto - stat_prefix: ingress_http - route_config: - name: local_route - virtual_hosts: - - name: service2 - domains: - - "*" - routes: - - match: - prefix: "/" - route: - cluster: local_service - decorator: - operation: checkStock - http_filters: - - name: envoy.filters.http.router - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router - clusters: - - name: local_service - type: strict_dns - lb_policy: round_robin - load_assignment: - cluster_name: local_service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: 127.0.0.1 - port_value: 8080 diff --git a/examples/jaeger-native-tracing/verify.sh b/examples/jaeger-native-tracing/verify.sh deleted file mode 100755 index 85f4e59e6946b..0000000000000 --- a/examples/jaeger-native-tracing/verify.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -e - -export NAME=jaeger-native -export PORT_PROXY="${JAEGER_NATIVE_PORT_PROXY:-11000}" -export PORT_UI="${JAEGER_NATIVE_PORT_UI:-11001}" - -# shellcheck source=examples/verify-common.sh -. "$(dirname "${BASH_SOURCE[0]}")/../verify-common.sh" - - -run_log "Test services" -responds_with \ - Hello \ - "http://localhost:${PORT_PROXY}/trace/1" - -run_log "Test Jaeger UI" -responds_with \ - "" \ - "http://localhost:${PORT_UI}"