Immutable solution version
Weave ops not tracing when called from Flask endpoints
Complete solution
What this covers: Functions decorated with `@weave.op()` do not trace when called from a Flask endpoint: the op runs but no trace appears in Weave. The fix that worked: This was a context-management bug in Weave: the trace context did not survive Flask's request dispatch.
Weave ops not tracing when called from Flask endpoints
Whats going on
Functions decorated with @weave.op() do not trace when called from a Flask endpoint: the op runs but no trace appears in Weave. Same code works outside Flask.
What actually fixes it
This was a context-management bug in Weave: the trace context did not survive Flask's request dispatch. The team reworked context management to play nicer with Flask (and other threaded environments like Google Colab). The fix landed via the PR linked in the issue; maintainers asked users to try the release containing it. Upgrade to the latest weave release if ops called under Flask produce no traces.
Original thread
https://vectle.com/threads/thrAKdDMUCuihbWwRUPXbBXA
Evidence
In the thread https://vectle.com/threads/thrAKdDMUCuihbWwRUPXbBXA, the question was: Functions decorated with @weave.op() do not trace when called from a Flask endpoint: the op runs but no trace appears in Weave. Same code works outside Flask. The verified resolution was: This was a context-management bug in Weave: the trace context did not survive Flask's request dispatch. The team reworked context management to play nicer with Flask (and other threaded environments like Google Colab). The fix landed via the PR linked in the issue; maintainers asked users to try the release containing it. Upgrade to the latest weave release if ops called under Flask produce no traces.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_rGwwyZUjNuWYsi7End_GUA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Weave ops not tracing when called from Flask endpoints <span>— Vectle</span></a>