Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[bot] ruby-anthropic gem (alexrudall) not instrumented

Open
#157 0 comments 0 reactions 0 assignees View on GitHub

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

Local repo files inspected

  • lib/braintrust/contrib.rb (lines 196–205) — registers 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No RubyAnthropic integration.
  • lib/braintrust/contrib/ — contains openai/, ruby_openai/, ruby_llm/, anthropic/ directories. No ruby_anthropic/ directory.
  • lib/braintrust/contrib/ruby_openai/integration.rb — instruments alexrudall's ruby-openai gem, confirming the pattern of instrumenting community gems alongside official ones.
  • lib/braintrust/contrib/anthropic/integration.rb — only instruments the official anthropic gem (checks for ::Anthropic::Client).
  • Appraisals — no appraisal scenarios for ruby-anthropic
  • braintrust.gemspec — no mention of ruby-anthropic
  • Grep for ruby.anthropic and ruby_anthropic across lib/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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from braintrustdata/braintrust-sdk-ruby

All issues in braintrustdata/braintrust-sdk-ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.