diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py index 8f0a383412..b7e4cff400 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/dependencies.py @@ -47,13 +47,14 @@ def get_dist_dependency_conflicts( extra = "extra" instruments = "instruments" instruments_marker = {extra: instruments} - for dep in dist.requires: - if extra not in dep or instruments not in dep: - continue - - req = Requirement(dep) - if req.marker.evaluate(instruments_marker): - instrumentation_deps.append(req) + if dist.requires: + for dep in dist.requires: + if extra not in dep or instruments not in dep: + continue + + req = Requirement(dep) + if req.marker.evaluate(instruments_marker): + instrumentation_deps.append(req) return get_dependency_conflicts(instrumentation_deps)