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
opentelemetry-bootstrap and opentelemetry-instrument using Otel's opentelemetry-distro at main branch (1.30.0dev/0.51b0dev) fail with an error stack at loading of the urllib/Flask/sqlite3/logging instrumentor at app startup. urllib, sqlite3, and logging are some of the default_instrumentations:
Instrumenting of urllib failed
Traceback (most recent call last):
File "/opentelemetry-python-contrib/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py", line 104, in _load_instrumentors
conflict = get_dist_dependency_conflicts(entry_point_dist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opentelemetry-python-contrib/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py", line 50, in get_dist_dependency_conflicts
for dep in dist.requires:
^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
Failed to auto initialize opentelemetry
Traceback (most recent call last):
File "/opentelemetry-python-contrib/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/sitecustomize.py", line 39, in initialize
_load_instrumentors(distro)
File "/opentelemetry-python-contrib/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py", line 129, in _load_instrumentors
raise exc
File "/opentelemetry-python-contrib/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py", line 104, in _load_instrumentors
conflict = get_dist_dependency_conflicts(entry_point_dist)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opentelemetry-python-contrib/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py", line 50, in get_dist_dependency_conflicts
for dep in dist.requires:
^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
This also happens with the instrumentors for Flask, sqlite3, and logging. The TypeError eventually stops if I set OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=flask,logging,sqlite3,urllib
This doesn't happen with latest release 1.29.0/0.50b0.
EDIT: This is a separate issue. something else odd happens and I'm not sure if related. Spans from opentelemetry-instrumentation-flask end up being kind Internal instead of Server. Either way, error stacks not good.
Steps to Reproduce
I'm using main branches of the SDK and API (1.30.0dev/0.51b0dev) to auto-instrument a basic Flask app:
pip install opentelemetry-distro opentelemetry-exporter-otlp
opentelemetry-bootstrap -a install
opentelemetry-instrument flask run
tammy-baylis-swi
changed the title
Several instrumentation failures with TypeError (urllib, flask, sqlite3, logging) on dev version
Several auto-instrumentation failures with TypeError (urllib, flask, sqlite3, logging) on dev version
Jan 3, 2025
Strange, I have opentelemetry-instrument working without issues with Python 3.10 on yesterday main with the flask instrumentor. @tammy-baylis-swi What version of importlib-metadata do you have?
Describe your environment
OS: Ubuntu
Python version: 3.12.8
SDK version: 1.30.0dev
API version: 0.51b0dev
What happened?
opentelemetry-bootstrap
andopentelemetry-instrument
using Otel's opentelemetry-distro atmain
branch (1.30.0dev/0.51b0dev) fail with an error stack at loading of the urllib/Flask/sqlite3/logging instrumentor at app startup. urllib, sqlite3, and logging are some of the default_instrumentations:This also happens with the instrumentors for Flask, sqlite3, and logging. The TypeError eventually stops if I set
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=flask,logging,sqlite3,urllib
This doesn't happen with latest release 1.29.0/0.50b0.
EDIT: This is a separate issue.
something else odd happens and I'm not sure if related. Spans fromopentelemetry-instrumentation-flask
end up being kindInternal
instead ofServer
. Either way, error stacks not good.Steps to Reproduce
I'm using
main
branches of the SDK and API (1.30.0dev/0.51b0dev) to auto-instrument a basic Flask app:with app.py as:
The TypeError stops if I set
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS=flask,logging,sqlite3,urllib
but I want to instrument those frameworks.Expected Result
No error traces
Actual Result
Error trace as above
Additional context
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: