andreahlert opened a new pull request, #684:
URL: https://github.com/apache/burr/pull/684

   ## Summary
   - `_init_instrument` was calling `.is_instrumented_by_opentelemetry` and 
`.instrument()` on the **class** instead of an **instance**
   - The `property` descriptor on the class is always truthy, so 
instrumentation was silently skipped with a `"is already instrumented"` debug 
log
   - Even if it reached `.instrument()`, the call would fail with `TypeError: 
missing 1 required positional argument: 'self'`, caught and swallowed by the 
bare `except BaseException`
   
   Fixes the class reference to instantiate it first, matching the standard 
OpenTelemetry instrumentor API.
   
   Closes #408
   
   ## Test plan
   - [x] Reproduced in a clean Docker container (Python 3.11, burr 0.41.0, 
opentelemetry-instrumentation-openai) confirming 
`is_instrumented_by_opentelemetry = False` after `init_instruments("openai")`
   - [x] Applied fix and verified `is_instrumented_by_opentelemetry = True` 
after `init_instruments("openai")`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to