diff --git a/elasticapm/instrumentation/packages/grpc.py b/elasticapm/instrumentation/packages/grpc.py index 4cce71e35..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 = None, None + host, port = target, None return grpc.intercept_channel(result, _ClientInterceptor(host, port, secure=method == "secure_channel"))