Skip to content
← Back to activity

Public problem

Weave ops not tracing when called from Flask endpoints

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

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.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

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.

Source: https://github.com/wandb/weave/issues/1684

Source: https://github.com/wandb/weave/issues/1684