[bot] aws-sdk-bedrockruntime gem not instrumented (228K weekly downloads)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- aws, ruby
调研方向
首先阅读 lib/braintrust/contrib/ 下现有的集成,尤其是 openai/ 和 anthropic/,然后检查 lib/braintrust/contrib.rb、Appraisals 和 braintrust.gemspec。完成的标准是 AWS Bedrock Runtime 集成已注册,并覆盖 converse、streaming、invoke-model 和 async API,以及所列出的输入、元数据、使用量和输出。
由索引模型根据 Issue 内容生成。
描述
Summary
The aws-sdk-bedrockruntime gem is the official AWS SDK for invoking foundation models on Amazon Bedrock. With ~16.6M downloads, continuous releases (v1.75.0, April 2026), and a standardized converse/converse_stream API surface across all Bedrock-hosted models (Claude, Titan, Llama, Mistral, Cohere, etc.), it is not instrumented by this SDK.
The SDK instruments standalone provider clients for OpenAI (openai, ruby-openai) and Anthropic (anthropic), but has no instrumentation for the AWS Bedrock Runtime client, which is one of the most widely used ways to invoke generative AI models in Ruby production environments.
What is missing
No instrumentation exists for any aws-sdk-bedrockruntime execution surface. Key APIs that should be instrumented:
Converse API (unified chat)
client.converse(...)— Unified chat API with structured messages, system prompts, tool use (tool_config,tool_use,tool_result), inference config (temperature, max_tokens, top_p, stop_sequences), and guardrails. Returns structuredConverseResponsewith usage metrics (input/output tokens), stop reason, and model-specific metadata. Works identically across all Bedrock-hosted models.client.converse_stream(...)— Streaming variant with event-based output (content_block_delta,content_block_start,content_block_stop,message_start,message_stop,metadata). Includes token usage and latency metrics in the stream metadata event.
Invoke Model API (raw model invocation)
client.invoke_model(...)— Raw model invocation with provider-specific request body. Returns raw response body. Used for embeddings (e.g., Titan Embeddings, Cohere Embed) and other model-specific APIs.client.invoke_model_with_response_stream(...)— Streaming variant of raw invocation.
Async Invoke API
client.start_async_invoke(...)— Asynchronous model invocation for long-running tasks.client.get_async_invoke(...)— Check status of async invocation.
Expected instrumentation
The converse/converse_stream APIs are the primary instrumentation target due to their standardized request/response shapes:
Converse spans should capture:
- Input: messages array, system prompts, tool configuration
- Metadata: model_id, inference_config (temperature, max_tokens, top_p, stop_sequences), guardrail_config, additional_model_request_fields, provider, endpoint
- Metrics: usage (input_tokens, output_tokens, total_tokens), latency metrics from stream metadata
- Output: response messages, stop_reason, additional_model_response_fields
Invoke model spans (for embeddings) should capture:
- Input: request body (model-specific)
- Metadata: model_id, content_type, accept, provider
- Output: response body metadata
Braintrust docs status
supported — Braintrust lists AWS Bedrock as a supported AI provider at https://www.braintrust.dev/docs. The Braintrust proxy supports Bedrock routing. However, there is no Ruby SDK auto-instrumentation for the aws-sdk-bedrockruntime gem — the SDK integrations page at https://www.braintrust.dev/docs/integrations/sdk-integrations does not list it as a supported Ruby library.
Upstream sources
- Official AWS SDK for Ruby: https://github.com/aws/aws-sdk-ruby
- RubyGems: https://rubygems.org/gems/aws-sdk-bedrockruntime (~16.6M downloads, v1.75.0, April 2026)
- AWS Bedrock Runtime API reference: https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockRuntime/Client.html
- AWS Bedrock Converse API docs: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html
Local repo files inspected
lib/braintrust/contrib/— contains onlyopenai/,ruby_openai/,ruby_llm/,anthropic/, andrails/directories. Nobedrockorawsdirectory.lib/braintrust/contrib.rb— registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No Bedrock integration.Appraisals— no appraisal scenarios foraws-sdk-bedrockruntimebraintrust.gemspec— no mention ofawsorbedrock- Grep for
bedrockacross entire codebase returns zero matches
- 主要语言
- 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
-
Unconfirmed users who reset their password are stuck on sign in with no way to send confirmation未关闭
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
L: github:actions L: javascript
难度 2/5 1-3 小时 新手友好度 75/100
dependabot/dependabot-core#16615 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 61/100
hitobito/hitobito_pfadi_de#164 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 7 天内回复