[bot] ruby-anthropic gem (alexrudall) not instrumented
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- ruby
- Domain
- observability
Research direction
Start with lib/braintrust/contrib/ruby_openai/integration.rb and lib/braintrust/contrib/anthropic/integration.rb to compare the community-gem and official-gem patterns. Then inspect lib/braintrust/contrib.rb, Appraisals, and braintrust.gemspec for registration and dependency coverage. Done means ruby-anthropic's messages, streaming, batches, and vision execution surfaces are instrumented and the gem is represented in the repository setup.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Ruby
- Stars
- 9
- Forks
- 10
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 6
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from braintrustdata/braintrust-sdk-ruby
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
ruby
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
ruby
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in braintrustdata/braintrust-sdk-ruby
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
slovensko-digital/autogram-portal#392 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
betagouv/conseillers-entreprises#4720 ·
Maintainers usually reply within 3 days
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
zerocracy/judges-action#2692 · 1 comment ·
Maintainers usually reply within 6 days
-
agent:triaged bug bughunt pm:bundler priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
SocketDev/socket-patch#896 · 1 comment ·
Maintainers usually reply within 1 day