[bot] dspy gem (dspy.rb) not instrumented
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- ruby
调研方向
先从 lib/braintrust/contrib.rb 中现有的集成注册和 lib/braintrust/contrib/ 下的文件开始,然后检查 dspy.rb 的 Predict、ChainOfThought、ReAct 和 LM API。查看 Appraisals 的设置,了解集成场景是如何执行的;完成标准是:dspy 模块执行和 ReAct 工具调用都能使用所列的输入、输出、模型详细信息和推理数据进行跟踪。
由索引模型根据 Issue 内容生成。
描述
Summary
The dspy gem (dspy.rb, ~70K downloads, v1.0.0, April 2026) is the Ruby port of the DSPy LLM programming framework and is not instrumented by this SDK. Braintrust documents DSPy integration for Python, capturing module-level spans for Predict, ChainOfThought, and other DSPy modules — but there is no equivalent Ruby instrumentation for dspy.rb.
What is missing
No instrumentation exists for any dspy execution surface. Key APIs that should be instrumented:
Module Execution
DSPy::Predict#call(**inputs)— single-pass LLM call with typed input/output contract. The core building block of all DSPy programs.DSPy::ChainOfThought#call(**inputs)— LLM call that surfaces intermediate chain-of-thought reasoning steps before the final answer. Produces a richer trace thanPredictdue to the reasoning span.DSPy::ReAct#call(**inputs)— agentic reasoning loop that interleaves LLM calls with tool executions. May span multiple LLM turns and tool invocations.
Tool Execution (ReAct)
- Tool calls dispatched within
DSPy::ReActloops should be captured as child spans, including tool name, inputs, and output.
LM Configuration
DSPy::LM.new('openai/gpt-4o-mini', ...)— LM adapter configuration, useful for capturing which model and provider is driving each module.
Expected instrumentation
Module execution spans should capture:
- Module type (Predict, ChainOfThought, ReAct)
- Signature type name (typed input/output schema)
- Input fields and values
- LLM calls made (model, provider, tokens)
- Intermediate reasoning steps (for ChainOfThought)
- Tool calls and results (for ReAct)
- Typed output fields
Braintrust docs status
unclear — Braintrust documents DSPy integration at https://www.braintrust.dev/docs/integrations/sdk-integrations/dspy and captures Predict, ChainOfThought, and other DSPy module spans with full tracing. However, the documented integration requires dspy>=2.6.0 (Python) and covers only Python. No Ruby-specific dspy.rb instrumentation is documented.
Upstream sources
- GitHub: https://github.com/vicentereig/dspy.rb
- RubyGems: https://rubygems.org/gems/dspy (~70K downloads, v1.0.0, April 11, 2026; 73 releases since March 2025)
- Documentation: https://github.com/vicentereig/dspy.rb#readme
Local repo files inspected
lib/braintrust/contrib.rb(lines 195–205) — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. Nodspyintegration.lib/braintrust/contrib/— no directory or files fordspyAppraisals— no appraisal scenarios fordspybraintrust.gemspec— no mention ofdspy- Grep for
dspy,DSPy,Predict,ChainOfThought,ReActacross entire codebase returns zero matches
- 主要语言
- Ruby
- 星标
- 9
- 派生
- 11
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-ruby 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
ruby
难度 3/5 半天 新手友好度 62/100
-
ruby
难度 3/5 1-2 天 新手友好度 45/100
查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 66/100
betagouv/conseillers-entreprises#4770 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
seek4science/seek#2762 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
Freika/dawarich#3910 · 3 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
rubyevents/rubyevents#2277 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 92/100
维护者通常 2 天内回复