From 0322bf75e4e6516a285258e05ddda2eface8efac Mon Sep 17 00:00:00 2001 From: Makro <4398091+xmakro@users.noreply.github.com> Date: Sat, 21 Dec 2024 09:46:10 -0800 Subject: [PATCH] Disconnect gRPC client stub when shutting down OTLPSpanExporter --- .../src/opentelemetry/exporter/otlp/proto/grpc/exporter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py index 582d083e86..2f491b7ed4 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py @@ -360,6 +360,7 @@ def shutdown(self, timeout_millis: float = 30_000, **kwargs) -> None: # wait for the last export if any self._export_lock.acquire(timeout=timeout_millis / 1e3) self._shutdown = True + self._client = None self._export_lock.release() @property