[bot] ruby-anthropic gem (alexrudall) not instrumented
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- ruby
调研方向
先从 lib/braintrust/contrib/ruby_openai/integration.rb 和 lib/braintrust/contrib/anthropic/integration.rb 开始,比较 community-gem 和 official-gem 的模式。然后检查 lib/braintrust/contrib.rb、Appraisals 和 braintrust.gemspec,确认注册情况和依赖覆盖范围。当 ruby-anthropic 的 messages、streaming、batches 和 vision 执行面都完成 instrumentation,并且该 gem 已纳入 repository 设置时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Summary
The ruby-anthropic gem (~444K downloads, v0.4.2, April 2025) by alexrudall is not instrumented by this SDK. This is a direct asymmetry: the SDK instruments both the official OpenAI gem (openai) and alexrudall's community OpenAI gem (ruby-openai), but for Anthropic it only instruments the official gem (anthropic) — not the equivalent community gem (ruby-anthropic) by the same author.
What is missing
No instrumentation exists for any ruby-anthropic execution surface. Key APIs that should be instrumented:
Messages API (Chat Completions)
client.messages(parameters: { model:, messages:, ... })— Core chat completions method supporting Claude models (claude-3-haiku, claude-3-sonnet, claude-3-opus, claude-3.5-sonnet, etc.)
Streaming
client.messages(parameters: { ..., stream: Proc.new { |chunk| } })— Streaming responses via callback proc
Batches API
client.messages.batches.create(parameters: { ... })— Asynchronous batch processing of multiple message requests
Vision
- Multimodal image analysis via base64-encoded image content in messages
Braintrust docs status
not_found — Braintrust docs at https://www.braintrust.dev/docs/instrument/trace-llm-calls list only the official anthropic gem (minimum version 0.3.0) for Ruby Anthropic tracing. No mention of ruby-anthropic anywhere.
Upstream sources
- GitHub: https://github.com/alexrudall/ruby-anthropic
- RubyGems: https://rubygems.org/gems/ruby-anthropic (~444K downloads, v0.4.2, April 2025)
- Author: alexrudall (same author as
ruby-openai, which IS instrumented by this SDK)
Local repo files inspected
lib/braintrust/contrib.rb(lines 196–205) — registers 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No RubyAnthropic integration.lib/braintrust/contrib/— containsopenai/,ruby_openai/,ruby_llm/,anthropic/directories. Noruby_anthropic/directory.lib/braintrust/contrib/ruby_openai/integration.rb— instruments alexrudall'sruby-openaigem, confirming the pattern of instrumenting community gems alongside official ones.lib/braintrust/contrib/anthropic/integration.rb— only instruments the officialanthropicgem (checks for::Anthropic::Client).Appraisals— no appraisal scenarios forruby-anthropicbraintrust.gemspec— no mention ofruby-anthropic- Grep for
ruby.anthropicandruby_anthropicacrosslib/braintrust/returns zero matches
Notes
The existing ruby_openai integration demonstrates the pattern for instrumenting alexrudall's community gems. A ruby_anthropic integration could follow the same structure: RubyAnthropic::Integration, RubyAnthropic::MessagesPatcher, etc., mirroring how RubyOpenAI::ChatPatcher parallels OpenAI::ChatPatcher.
- 主要语言
- Ruby
- 星标
- 9
- 派生
- 11
- 平均合并
- 3 天 43 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-ruby 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
braintrustdata/braintrust-sdk-ruby#155 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
braintrustdata/braintrust-sdk-ruby#143 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
braintrustdata/braintrust-sdk-ruby#137 ·
维护者通常 1 天内回复
-
ruby
难度 3/5 半天 新手友好度 62/100
braintrustdata/braintrust-sdk-ruby#229 ·
维护者通常 1 天内回复
-
ruby
难度 3/5 1-2 天 新手友好度 45/100
braintrustdata/braintrust-sdk-ruby#228 ·
维护者通常 1 天内回复
查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复