From 63985da17a09b63ab577e5ebd5c0bfa8da001c14 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Fri, 13 Sep 2024 18:27:04 +0200 Subject: [PATCH] Fix previous commit --- .../instrumentation/auto_instrumentation/_load.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py index 0e410c7d25..8c2fefef3b 100644 --- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py +++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/auto_instrumentation/_load.py @@ -49,8 +49,11 @@ def dist_for(self, entry_point: EntryPoint): if dist: return dist - key = f"{entry_point.group}:{entry_point.name}:{entry_point.value}" - return self._mapping.get(key) + return self._mapping.get(self.key_for(entry_point)) + + @staticmethod + def _key_for(entry_point: EntryPoint): + return f"{entry_point.group}:{entry_point.name}:{entry_point.value}" def _load_distro() -> BaseDistro: