From f15821fe272707930caab57c0e906bdb0d04074f Mon Sep 17 00:00:00 2001 From: Ali Alnosairi <144171192+Ali-Alnosairi@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:08:26 +0300 Subject: [PATCH] Update type signature of get_metrics_data() to accept "None" return type (#4186) --- .../src/opentelemetry/sdk/metrics/_internal/export/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py index cf94bc565e..4acf1cc81d 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py @@ -404,7 +404,7 @@ def __init__( def get_metrics_data( self, - ) -> "opentelemetry.sdk.metrics.export.MetricsData": + ) -> Optional["opentelemetry.sdk.metrics.export.MetricsData"]: """Reads and returns current metrics from the SDK""" with self._lock: self.collect()