open-telemetry / opentelemetry-python-contrib

OpenTelemetry instrumentation for Python modules
https://opentelemetry.io
Apache License 2.0
739 stars 613 forks source link

teach instrument version constraint for sqlalchemy #2970

Closed emdneto closed 2 weeks ago

emdneto commented 2 weeks ago
          Although the issue seems to be caused by:
opentelemetry-instrumentation-test==1.0.0b.dev

the actual error originates from the sqlalchemy dependency (if included in your project): https://github.com/open-telemetry/opentelemetry-python-contrib/blob/77613da39651e9406f163249c5cc90e6e226d964/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py#L164; It appears to be the only module missing a version specifier (e.g., >= 3.0). Adding this version specifier resolves the issue on my end. Looks like something has changes in Python packaging module recently as I don't see any changes in bootstrap_gen.py.

@emdneto, please hold off on merging your PR and consider fixing this line first.

Originally posted by @rayrapetyan in https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2968#issuecomment-2461248922