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
ChatAdapter::format/parse — has debug!() and trace!() calls
LMClient connection setup — has debug!()/warn!()/trace!() calls
Not instrumented (gaps):
ChainOfThought::forward() — no tracing spans
ReAct::forward() — no tracing spans
All optimizer methods (COPRO::compile, GEPA::compile, MIPROv2::compile) — no spans at all. These are long-running and would benefit the most from progress visibility
DataLoader::load_* methods — no spans
evaluate_trainset() / evaluation loop — no spans
Constraint validation in bamltype::parse_llm_output — no spans
What "add tracing" should mean concretely:
Optimizer observability — these run for minutes/hours. Need:
Per-trial spans with trial number, candidate instruction, score
Progress indicators (current trial / total trials)
Aggregated stats (best score so far, avg score)
Module composition spans — when ChainOfThought calls Predict internally, the span hierarchy should show the nesting
Prompt visibility — debug!() level should emit the full formatted prompt and raw LM response (currently only partial)
Structured fields — use tracing structured fields (not string interpolation) so spans are machine-parseable:
Subscriber setup — provide a convenience dspy_rs::init_tracing() that sets up tracing-subscriber with sensible defaults (env-filter, fmt layer). Currently users have to configure this themselves.
Not blocked on anything — can be done incrementally file by file.
Activity
darinkishore commentedon Feb 12, 2026
Codebase audit — current tracing state
Already instrumented (using
tracingcrate):LM::call()—#[tracing::instrument(name = "dsrs.lm.call")]LM::execute_tool_loop()—#[tracing::instrument(name = "dsrs.lm.tool_loop")]ResponseCache::new/get/insert— instrumentedPredict::forward()—#[tracing::instrument(name = "dsrs.predict.forward")]ChatAdapter::format/parse— hasdebug!()andtrace!()callsLMClientconnection setup — hasdebug!()/warn!()/trace!()callsNot instrumented (gaps):
ChainOfThought::forward()— no tracing spansReAct::forward()— no tracing spansCOPRO::compile,GEPA::compile,MIPROv2::compile) — no spans at all. These are long-running and would benefit the most from progress visibilityDataLoader::load_*methods — no spansevaluate_trainset()/ evaluation loop — no spansbamltype::parse_llm_output— no spansWhat "add tracing" should mean concretely:
Optimizer observability — these run for minutes/hours. Need:
Module composition spans — when
ChainOfThoughtcallsPredictinternally, the span hierarchy should show the nestingPrompt visibility —
debug!()level should emit the full formatted prompt and raw LM response (currently only partial)Structured fields — use
tracingstructured fields (not string interpolation) so spans are machine-parseable:Subscriber setup — provide a convenience
dspy_rs::init_tracing()that sets uptracing-subscriberwith sensible defaults (env-filter, fmt layer). Currently users have to configure this themselves.Not blocked on anything — can be done incrementally file by file.