[BOT ISSUE] llm.rb gem not instrumented
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- ruby
- Domain
- observability
Research direction
Start with lib/braintrust/contrib.rb and the existing OpenAI, RubyOpenAI, RubyLLM, and Anthropic integrations, then review llm.rb's chat, completion, tool-calling, embedding, and agent APIs. Check Appraisals and braintrust.gemspec for integration setup; done means llm.rb execution surfaces have dedicated instrumentation with coverage for the listed metadata and provider behaviors.
Written by the indexing model from the issue text.
Description
Summary
The llm.rb gem (RubyGems: llm.rb) is an actively maintained Ruby toolkit for building LLM-powered systems that is not instrumented by this SDK. It is a distinct library from ruby_llm (crmne/ruby_llm), which is already instrumented.
llm.rb has 69K+ downloads, reached v4.11.0 (April 2026), and provides execution-oriented API surfaces across 8 providers.
What is missing
No instrumentation exists for any llm.rb execution surface. Key APIs that should be instrumented:
Chat / Completions
LLM::Context#chat— stateful chat with conversation history- Streaming responses via structured callbacks
- Stateless completions
Tool Calling
- Automatic tool orchestration across providers
- Concurrent tool execution (threads, fibers, async)
- Tool execution during streaming
Embeddings
LLM::Provider#embed— vector embeddings generation
Agents
- Reusable, preconfigured assistants with tool auto-execution
Supported Providers
OpenAI, Anthropic, Google, DeepSeek, xAI, zAI, Ollama, LlamaCpp
Braintrust docs status
not_found — No mention of llm.rb or llmrb anywhere in Braintrust documentation at https://www.braintrust.dev/docs. The Braintrust SDK integrations page at https://www.braintrust.dev/docs/integrations/sdk-integrations lists "Ruby LLM" (which refers to the ruby_llm gem, a different library).
Upstream sources
- GitHub: https://github.com/llmrb/llm.rb
- RubyGems: https://rubygems.org/gems/llm.rb (69K+ downloads, v4.11.0, April 2026)
- Documentation: https://github.com/llmrb/llm.rb#readme
Local repo files inspected
lib/braintrust/contrib.rb(lines 195–205) — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. Nollm.rbintegration.lib/braintrust/contrib/— no directory or files forllm_rborllmrbAppraisals— no appraisal scenarios forllm.rbbraintrust.gemspec— no mention ofllm.rb
Notes
llm.rb has built-in OpenTelemetry support, so users can get basic tracing via Braintrust's OTEL integration. However, dedicated instrumentation would capture richer provider-specific metadata (model parameters, token usage breakdowns, tool execution details, cost tracking) consistent with how the SDK instruments ruby_llm, openai, and anthropic today.
- 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
-
chore
Difficulty 1/5 Under an hour Newbie friendliness 78/100
AllYourBot/hostedgpt#818 · 4 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
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 65/100
voxpupuli/puppet-quadlets#122 · 5 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
TheOdinProject/curriculum#31452 ·
Maintainers usually reply within 1 day