From 5013aef6fc9cfc3e0142975e73aa660ff36a08c5 Mon Sep 17 00:00:00 2001 From: Fernando Cainelli Date: Thu, 19 Dec 2024 17:11:35 -0300 Subject: [PATCH] release-1.24: Fix ext_proc tracing sampling (#6) --- .github/workflows/build.yaml | 2 +- WORKSPACE | 5 ++++- external/fix-extproc-sampling.patch | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 external/fix-extproc-sampling.patch diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 536507f066..7e9f347278 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,4 +33,4 @@ jobs: context: . platforms: linux/amd64 push: true - tags: getyourguide/proxy:1.24.2-patch + tags: getyourguide/proxy:1.24.2-patch.${{ github.run_number }} diff --git a/WORKSPACE b/WORKSPACE index b4c6c64cad..31dc77e8d0 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -38,7 +38,10 @@ http_archive( sha256 = ENVOY_SHA256, strip_prefix = ENVOY_REPO + "-" + ENVOY_SHA, url = "https://github.com/" + ENVOY_ORG + "/" + ENVOY_REPO + "/archive/" + ENVOY_SHA + ".tar.gz", - patches = ["fix-websocket-handshake.patch"], + patches = [ + "fix-websocket-handshake.patch", + "fix-extproc-sampling.patch" + ], patch_args = ["-p1"], ) diff --git a/external/fix-extproc-sampling.patch b/external/fix-extproc-sampling.patch new file mode 100644 index 0000000000..322522a8ad --- /dev/null +++ b/external/fix-extproc-sampling.patch @@ -0,0 +1,14 @@ +diff --git a/source/extensions/filters/http/ext_proc/ext_proc.cc b/source/extensions/filters/http/ext_proc/ext_proc.cc +index 0d35d05425..d1de199068 100644 +--- a/source/extensions/filters/http/ext_proc/ext_proc.cc ++++ b/source/extensions/filters/http/ext_proc/ext_proc.cc +@@ -416,7 +416,8 @@ Filter::StreamOpenState Filter::openStream() { + auto options = Http::AsyncClient::StreamOptions() + .setParentSpan(decoder_callbacks_->activeSpan()) + .setParentContext(grpc_context) +- .setBufferBodyForRetry(grpc_service_.has_retry_policy()); ++ .setBufferBodyForRetry(grpc_service_.has_retry_policy()) ++ .setSampled(absl::nullopt); + + ExternalProcessorClient* grpc_client = dynamic_cast(client_.get()); + ExternalProcessorStreamPtr stream_object =