From 7ba7261df1a8f5fcc24cac7696ac0a17f6a06f42 Mon Sep 17 00:00:00 2001 From: "Jens H. Nielsen" Date: Thu, 6 Jul 2023 14:53:26 +0200 Subject: [PATCH] Don't recommend deprecated pkg_resources package Use std library importlib.metadata.version as the current recommended alternative --- opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py b/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py index 0b844e24d9..a2cec065cd 100644 --- a/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py +++ b/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py @@ -143,7 +143,7 @@ def get_logger( version: Optional. The version string of the instrumenting library. Usually this should be the same as - ``pkg_resources.get_distribution(instrumenting_library_name).version``. + ``importlib.metadata.version(instrumenting_library_name)``. schema_url: Optional. Specifies the Schema URL of the emitted telemetry. """