Repository navigation
Conversation
|
Hey @rominf, the integration code that you linked is meant to be used with the Line 63 in ba6de38 |
|
We can still look into updating the distro version for the |
|
@sentrivana Ah, OK, I was a bit wrong. Here is what happened: I was in the process of packaging the latest version for Fedora (https://src.fedoraproject.org/rpms/python-sentry-sdk) and the build failed because of import error in the referenced place. Previously, it worked because all the modules |
|
@rominf Gotcha, thanks for the extra context! 👍🏻 I'd prefer if we could keep the It seems that the functions exist almost in the same shape in try:
# for opentelemetry-distro 0.40b0
from opentelemetry.instrumentation.auto_instrumentation._load import _load_distro, _load_instrumentors
except ImportError:
# for opentelemetry-distro versions between 0.35b0 and 0.39b0
from opentelemetry.old_fun_location import _load_distros as _load_distro, _load_instrumentors ...would that work from a packaging perspective? Alternatively, do you see anything else we can do SDK-side to mark the Adding the module to the ignore list for import checks sounds like the way to go to me atm, but would like to have your opinion on the above. |
I agree!
Yes, it should work. Thank you for the investigation!
👍 I am closing the PR as no longer required. |
|
So the conditional import won't work since there's some top level unguarded function running in the original module. I think putting |
Current version of the dependency is incorrect, since integration code: https://github.com/getsentry/sentry-python/blob/ba6de38d915a2d66a7633017306c425ba4b34a72/sentry_sdk/integrations/opentelemetry/integration.py#L18 requires: ``` opentelemetry.instrumentation.auto_instrumentation._load ``` module to be present, but it was introduced only in `0.40b`: https://github.com/open-telemetry/opentelemetry-python-contrib/commits/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py
668bd99 to
e204c23
Compare
|
Hi @sentrivana! I am back.
No, this does not work neither for packaging, nor for end users of This is an issue for Fedora packaging in particular, since there is no Any suggestions? |
|
Hey @rominf, sorry for the wait, was out of office last week. We can definitely remove the offending import from |
|
Hey @sentrivana. Thank you! I think it should work fine. |
|
Thanks for checking! Merged it now, it'll be out with the next release, likely next week at the latest. |
Current version of the dependency is incorrect, since integration code:
sentry-python/sentry_sdk/integrations/opentelemetry/integration.py
Line 18 in ba6de38
requires:
module to be present, but it was introduced only in
0.40b:https://github.com/open-telemetry/opentelemetry-python-contrib/commits/main/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py