From 26f1a85bc7c9a333671bde6bf7197c37075bda5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ahlert?= Date: Wed, 18 Mar 2026 14:25:37 -0300 Subject: [PATCH] fix: instantiate instrumentor class before calling instrument() _init_instrument was accessing is_instrumented_by_opentelemetry and calling instrument() on the class instead of an instance. The property descriptor on the class is always truthy, causing instrumentation to be silently skipped. Closes #408 --- burr/integrations/opentelemetry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/burr/integrations/opentelemetry.py b/burr/integrations/opentelemetry.py index 32dc4dd7f..7a6970e88 100644 --- a/burr/integrations/opentelemetry.py +++ b/burr/integrations/opentelemetry.py @@ -665,7 +665,8 @@ def _init_instrument( try: instrumentation_module = importlib.import_module(instrumentation_module_name) - instrumentor = getattr(instrumentation_module, instrumentor_name) + instrumentor_cls = getattr(instrumentation_module, instrumentor_name) + instrumentor = instrumentor_cls() if instrumentor.is_instrumented_by_opentelemetry: logger.debug(f"`{module_name}` is already instrumented.") else: