Siyang Xie
Siyang Xie
Hi~ IMO a broader request is to support tracking "sync-to-async" function execution in general (not limited to sync routes), which would be tremendously useful to profile FastAPI services that use...
here's a dummy example (I'm using `asgiref.sync.SyncToAsync` as convenient helper to execute sync func in threadpool while propagating context, noticing that `loop.run_in_executor()` does not propagate context by default): ``` from...
Here's some test code that could reproduce this: ``` @activity.defn async def short_activity_async(): delay = random.uniform(0.05, 0.15) # 50~150ms delay await asyncio.sleep(delay) @activity.defn def short_activity_sync(): delay = random.uniform(0.05, 0.15) #...