Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[bot] google-cloud-ai_platform gem (Vertex AI) not instrumented (13K weekly downloads)

未关闭
#184 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
google-cloud, ruby

调研方向

从 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; yields GenerateContentResponse chunks 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: candidates content, 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

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 only openai/, ruby_openai/, ruby_llm/, anthropic/, and rails/ directories. No google/ or vertex/ directory.
  • Appraisals — no appraisal scenarios for google-cloud-ai_platform
  • braintrust.gemspec — no mention of google or vertex
  • Grep for google, vertex, ai_platform across lib/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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

braintrustdata/braintrust-sdk-ruby 的其他 Issue

查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。