You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: using_attributes loses span attributes in async functions #2009
@openlit.using_attributes drops its configured attributes when it decorates an async def function. The exported score event still exists, but any grouping or lookup based on the missing field loses that context. Using the same API as a with block around an await preserves the attribute.
Steps to reproduce
Run this locally with the SDK installed. It uses an in-memory OpenTelemetry span and no provider or collector.
The configured attributes are present while the async function runs, including after an await. The caller's previous attributes are restored when the function exits.
Environment
OpenLIT Python SDK 1.45.0, main 463a1c1b3cd72a94fab4155efe0f28d90d87fe95, Python 3.12.11, Windows.
Additional context
Codex assisted with source inspection and the reproduction. This is a local reproduction using synthetic score data.
Pre-submission checklist
I searched existing issues and didn't find a duplicate
Activity