diff --git a/README.md b/README.md index 9c478e2f3f0..13c3b317030 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ # Istio Proxy +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Frshriram%2Fproxy.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Frshriram%2Fproxy?ref=badge_shield) + The Istio Proxy is a microservice proxy that can be used on the client and server side, and forms a microservice mesh. The Proxy supports a large number of features. @@ -26,3 +28,7 @@ Please see [istio.io](https://istio.io) to learn about the overall Istio project and how to get in touch with us. To learn how you can contribute to any of the Istio components, including the proxy, please see the Istio [contribution guidelines](https://github.com/istio/istio/blob/master/CONTRIBUTING.md). + + +## License +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Frshriram%2Fproxy.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Frshriram%2Fproxy?ref=badge_large) \ No newline at end of file diff --git a/WORKSPACE b/WORKSPACE index 1608142c1cf..c8462209a94 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -64,8 +64,8 @@ bind( git_repository( name = "envoy", - remote = "https://github.com/lyft/envoy.git", - commit = "060cb67f0772a425a8ceaf30d28421967d69c0c6", + remote = "https://github.com/amalgam8/envoy.git", + commit = "c89a99e893b633e97419d306e0072f07bd2200fa", ) load("@envoy//bazel:repositories.bzl", "envoy_dependencies") diff --git a/bin/envoy-alpha-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.sha256 b/bin/envoy-alpha-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.sha256 new file mode 100644 index 00000000000..ebb20bb7d4a --- /dev/null +++ b/bin/envoy-alpha-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.sha256 @@ -0,0 +1 @@ +b2540808efaaa9e2c45c21be882b19b95003b41c8af8c9a740e67ee3d82fcfec envoy-alpha-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz diff --git a/bin/envoy-alpha-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz b/bin/envoy-alpha-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz new file mode 100755 index 00000000000..63ea45089e5 Binary files /dev/null and b/bin/envoy-alpha-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz differ diff --git a/bin/envoy-debug-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.sha256 b/bin/envoy-debug-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.sha256 new file mode 100644 index 00000000000..db6855f2188 --- /dev/null +++ b/bin/envoy-debug-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.sha256 @@ -0,0 +1 @@ +21ddf0e73e14059836f597577ff6f0baa45204eceea65790f3958ac98a211801 envoy-debug-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz diff --git a/bin/envoy-debug-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz b/bin/envoy-debug-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz new file mode 100755 index 00000000000..c91bf22e86c Binary files /dev/null and b/bin/envoy-debug-ac4ef3f77692453dad2d04a6417bc6a1f3457e07.tar.gz differ diff --git a/src/envoy/mixer/http_filter.cc b/src/envoy/mixer/http_filter.cc index bcca469960f..65a311889c2 100644 --- a/src/envoy/mixer/http_filter.cc +++ b/src/envoy/mixer/http_filter.cc @@ -17,13 +17,16 @@ #include "common/common/logger.h" #include "common/http/headers.h" #include "common/http/utility.h" +#include "common/tracing/zipkin_tracer_impl.h" #include "envoy/server/instance.h" #include "envoy/ssl/connection.h" +#include "envoy/tracing/http_tracer.h" #include "server/config/network/http_connection_manager.h" #include "src/envoy/mixer/config.h" #include "src/envoy/mixer/http_control.h" #include "src/envoy/mixer/utils.h" + using ::google::protobuf::util::Status; using StatusCode = ::google::protobuf::util::error::Code; using ::istio::mixer_client::DoneFunc; @@ -223,6 +226,7 @@ class Instance : public Http::StreamDecoderFilter, initiating_call_ = false; if (state_ == Complete) { + updateSpan(); return FilterHeadersStatus::Continue; } Log().debug("Called Mixer::Instance : {} Stop", __func__); @@ -280,10 +284,23 @@ class Instance : public Http::StreamDecoderFilter, state_ = Complete; if (!initiating_call_) { + updateSpan(); decoder_callbacks_->continueDecoding(); } } + // After the check call, obtain the service name from the Mixer's + // response and update all the Zipkin annotations with the service + // name corresponding to the source ip. + void updateSpan() const { + Tracing::Span& activeSpan = decoder_callbacks_->activeSpan(); + if (Tracing::ZipkinSpan *zipkinSpan = dynamic_cast(&activeSpan)) { + Zipkin::Span& span = zipkinSpan->span(); + span.setSourceService(); //need source service name. + span.setDestinationService(); //need destination service name. + } + } + virtual void log(const HeaderMap* request_headers, const HeaderMap* response_headers, const AccessLog::RequestInfo& request_info) override {