From 8310b74921c98a3fb54783607562d72cbac4b845 Mon Sep 17 00:00:00 2001 From: Ajay Gupta Date: Fri, 28 Feb 2025 12:15:35 +0530 Subject: [PATCH 1/3] add target in case there is no host in target --- elasticapm/instrumentation/packages/grpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticapm/instrumentation/packages/grpc.py b/elasticapm/instrumentation/packages/grpc.py index 4cce71e35..cf59e2495 100644 --- a/elasticapm/instrumentation/packages/grpc.py +++ b/elasticapm/instrumentation/packages/grpc.py @@ -54,7 +54,7 @@ def call(self, module, method, wrapped, instance, args, kwargs): except ValueError: port = None else: - host, port = None, None + host, port = target, None return grpc.intercept_channel(result, _ClientInterceptor(host, port, secure=method == "secure_channel")) From bf7f26fd6fd625b7efb2fd5dee36e87cd4620403 Mon Sep 17 00:00:00 2001 From: Ajay Gupta Date: Fri, 28 Feb 2025 12:15:35 +0530 Subject: [PATCH 2/3] add target in case there is no host in target --- elasticapm/instrumentation/packages/grpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticapm/instrumentation/packages/grpc.py b/elasticapm/instrumentation/packages/grpc.py index 4cce71e35..cf59e2495 100644 --- a/elasticapm/instrumentation/packages/grpc.py +++ b/elasticapm/instrumentation/packages/grpc.py @@ -54,7 +54,7 @@ def call(self, module, method, wrapped, instance, args, kwargs): except ValueError: port = None else: - host, port = None, None + host, port = target, None return grpc.intercept_channel(result, _ClientInterceptor(host, port, secure=method == "secure_channel")) From 01c0bae99f33b9a0bc75a48d731d7e0e6ed9454f Mon Sep 17 00:00:00 2001 From: Ajay Gupta Date: Fri, 28 Feb 2025 13:45:57 +0530 Subject: [PATCH 3/3] add target in case there is no host in target --- elasticapm/instrumentation/packages/grpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elasticapm/instrumentation/packages/grpc.py b/elasticapm/instrumentation/packages/grpc.py index cf59e2495..80e0d2083 100644 --- a/elasticapm/instrumentation/packages/grpc.py +++ b/elasticapm/instrumentation/packages/grpc.py @@ -54,7 +54,7 @@ def call(self, module, method, wrapped, instance, args, kwargs): except ValueError: port = None else: - host, port = target, None + host, port = target, None return grpc.intercept_channel(result, _ClientInterceptor(host, port, secure=method == "secure_channel"))