You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docker environment
Image so: ubuntu:20.04
Python version: 3.9
Otel dependencies:
opentelemetry-api = "^1.14.0"
opentelemetry-semantic-conventions = "0.41b0" # At the moment there are no releases without beta
opentelemetry-instrumentation-urllib3 = "0.41b0" # At the moment there are no releases without beta
opentelemetry-instrumentation-httpx = "0.41b0" # At the moment there are no releases without beta
Steps to reproduce
Instrument any app and run it, it will throws a warning deprecation message about pkg_resource.
I created a CM of spans with something like this:
fromopentelemetryimporttrace@contextlib.contextmanagerdefcreate_span(tracer: trace.Tracer) ->Generator:
"Start the span as current span."name="name"_kind="kind"withtracer.start_as_current_span(
name,
kind=_kind,
record_exception=False,
) ascurrent_span:
yieldcurrent_span
What is the expected behavior?
Otel doesnt throws a deprecationWarning
What is the actual behavior?
The output is a deprecation warning:
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
FYI pkg_resources is deprecated AND REMOVED in modern python versions.
This package now depends on an undeclared dependency and is thus broken.
backend | from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
backend | File "/home/nonroot/.local/lib/python3.12/site-packages/opentelemetry/instrumentation/sqlalchemy/__init__.py", line 105, in <module>
backend | from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
backend | File "/home/nonroot/.local/lib/python3.12/site-packages/opentelemetry/instrumentation/instrumentor.py", line 27, in <module>
backend | from opentelemetry.instrumentation.dependencies import (
backend | File "/home/nonroot/.local/lib/python3.12/site-packages/opentelemetry/instrumentation/dependencies.py", line 4, in <module>
backend | from pkg_resources import (
backend | ModuleNotFoundError: No module named 'pkg_resources'
Describe your environment
Docker environment
Image so: ubuntu:20.04
Python version: 3.9
Otel dependencies:
opentelemetry-api = "^1.14.0"
opentelemetry-semantic-conventions = "0.41b0" # At the moment there are no releases without beta
opentelemetry-instrumentation-urllib3 = "0.41b0" # At the moment there are no releases without beta
opentelemetry-instrumentation-httpx = "0.41b0" # At the moment there are no releases without beta
Steps to reproduce
Instrument any app and run it, it will throws a warning deprecation message about pkg_resource.
I created a CM of spans with something like this:
What is the expected behavior?
Otel doesnt throws a deprecationWarning
What is the actual behavior?
The output is a deprecation warning:
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Additional context
Use of pkg_resources is deprecated
The text was updated successfully, but these errors were encountered: