Skip to content

Commit 7ba7261

Browse files
committed
Don't recommend deprecated pkg_resources package
Use std library importlib.metadata.version as the current recommended alternative
1 parent e076e7c commit 7ba7261

File tree

1 file changed

+1
-1
lines changed
  • opentelemetry-api/src/opentelemetry/_logs/_internal

1 file changed

+1
-1
lines changed

opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def get_logger(
143143
144144
version: Optional. The version string of the
145145
instrumenting library. Usually this should be the same as
146-
``pkg_resources.get_distribution(instrumenting_library_name).version``.
146+
``importlib.metadata.version(instrumenting_library_name)``.
147147
148148
schema_url: Optional. Specifies the Schema URL of the emitted telemetry.
149149
"""

0 commit comments

Comments
 (0)