[bot] google-cloud-ai_platform gem (Vertex AI) not instrumented (13K weekly downloads)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- google-cloud, ruby
- 领域
- ai, cloud, observability-sre
调研方向
从 lib/braintrust/contrib.rb 和现有的 lib/braintrust/contrib/ provider 目录开始,了解 integration 的注册和结构方式。为列出的生成、embedding 和 prediction 入口添加 Google Vertex AI integration,并包含指定的 span 数据和使用量指标,然后将其注册到 SDK 中。
由索引模型根据 Issue 内容生成。
描述
Summary
The google-cloud-ai_platform gem is the official Google Ruby SDK for Vertex AI, published by Google in the googleapis/google-cloud-ruby monorepo. With 875K+ downloads and a release on June 11, 2026 (v2.4.0), it is the authoritative Ruby path for accessing Gemini models on Vertex AI and is not instrumented by this SDK.
The SDK instruments standalone provider clients for OpenAI, Anthropic, and (community) Gemini via gemini-ai, but has no instrumentation for the official Google Vertex AI generative execution surface.
What is missing
No instrumentation exists for any google-cloud-ai_platform generative execution surface. Key APIs that should be instrumented (via Google::Cloud::AIPlatform::V1::PredictionService::Client):
Generative Content (Gemini on Vertex AI)
generate_content(...)— Non-streaming generative content generation for Gemini models; accepts messages, system instruction, tools (function declarations), generation config (temperature, max_output_tokens, top_p, top_k, stop_sequences), safety settings, and response schema for structured output.stream_generate_content(...)— Server-side streaming variant; yieldsGenerateContentResponsechunks with token usage in the final chunk.
Embeddings
embed_content(...)— Generates text embeddings via Gemini embedding models on Vertex AI.
General Prediction (non-Gemini Vertex models)
predict(...)— Online prediction for custom models and PaLM-family models.raw_predict(...)/direct_predict(...)— Raw HTTP/gRPC prediction for arbitrary Vertex endpoints.streaming_predict(...)/server_streaming_predict(...)— Streaming prediction variants.
Expected instrumentation
generate_content / stream_generate_content spans should capture:
- Input:
contents(messages array),system_instruction,tools(function declarations),tool_config - Metadata: model endpoint/model ID,
generation_config(temperature, max_output_tokens, top_p, top_k, stop_sequences, response_mime_type, response_schema), safety settings, location/project - Metrics:
usage_metadata(prompt_token_count, candidates_token_count, total_token_count) from response - Output:
candidatescontent,finish_reason
Braintrust docs status
not_found — The SDK integrations page at https://www.braintrust.dev/docs/integrations/sdk-integrations lists only ruby-llm as a Ruby-specific integration. There is no documented Ruby instrumentation path for Google Vertex AI or google-cloud-ai_platform.
Upstream sources
- Official GitHub (monorepo): https://github.com/googleapis/google-cloud-ruby/tree/main/google-cloud-ai_platform
- Wrapper gem RubyGems: https://rubygems.org/gems/google-cloud-ai_platform (v2.4.0, Jun 11, 2026, 875K+ downloads)
- Versioned client RubyGems: https://rubygems.org/gems/google-cloud-ai_platform-v1 (v1.44.0, Jun 11, 2026, 1.39M+ downloads)
- API reference: https://cloud.google.com/ruby/docs/reference/google-cloud-ai_platform/latest
- Vertex AI Gemini docs: https://cloud.google.com/vertex-ai/generative-ai/docs/reference/ruby/latest
Local repo files inspected
lib/braintrust/contrib.rb(lines 196–205) — registers only 4 integrations: OpenAI, RubyOpenAI, RubyLLM, Anthropic. No Google/Vertex integration.lib/braintrust/contrib/— contains onlyopenai/,ruby_openai/,ruby_llm/,anthropic/, andrails/directories. Nogoogle/orvertex/directory.Appraisals— no appraisal scenarios forgoogle-cloud-ai_platformbraintrust.gemspec— no mention ofgoogleorvertex- Grep for
google,vertex,ai_platformacrosslib/braintrust/returns zero matches
Weekly downloads
Weekly downloads: approximately 13K (as of 2026-10-14; ClickGems “last week”; source https://clickgems.clickhouse.com/dashboard/google-cloud-ai_platform).
- 主要语言
- Ruby
- 星标
- 9
- 派生
- 11
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
braintrustdata/braintrust-sdk-ruby 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
ruby
难度 3/5 半天 新手友好度 62/100
-
ruby
难度 3/5 1-2 天 新手友好度 45/100
查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue
相似的 Issue
-
verified
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 5 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
akitaonrails/ai-book-2026#10 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
TheOdinProject/curriculum#31495 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
zerocracy/judges-action#2984 ·
维护者通常 1 天内回复