Skip to content

[bot] Instrument Google Cloud Discovery Engine Go SDK (3,354,124 weekly downloads) #200

Description

@braintrust-bot

Summary

The Braintrust Go SDK instruments google.golang.org/genai for direct Gemini model inference and cloud.google.com/go/aiplatform is already tracked as a gap for Vertex AI Reasoning Engine / RAG execution (issue #168) — but neither covers Google Cloud Discovery Engine (cloud.google.com/go/discoveryengine), the Go client for Vertex AI Search / Agentspace's grounded-generation and conversational-search product. This is a distinct Go module with its own execution surface that is not reachable through either existing integration.

What is missing

A trace/contrib/discoveryengine/ integration module wrapping the generative execution methods on ConversationalSearchClient (package cloud.google.com/go/discoveryengine/apiv1):

  • AnswerQuery — grounded answer generation: retrieves from a Discovery Engine data store and generates a natural-language answer via an LLM (the core "RAG-as-a-service" execution call for this product)
  • StreamAnswerQuery — streaming variant of the above
  • ConverseConversation — multi-turn conversational search execution, maintaining conversation state across turns

These are genuinely new execution surfaces distinct from google.golang.org/genai (direct Gemini calls) and from cloud.google.com/go/aiplatform's ReasoningEngineExecutionClient/VertexRagClient (Vertex AI Agent Builder reasoning engines and RAG corpora) — Discovery Engine is a separate Google Cloud product (Vertex AI Search / Agentspace) with its own data stores, serving configs, and grounded-generation pipeline.

Braintrust docs status

not_found. Braintrust's Go SDK docs list openai, anthropic, bedrockruntime, genai, genkit, adk, cloudwego/eino, langchaingo, and sashabaranov/go-openai as supported trace/contrib integrations. Neither "Discovery Engine" nor "Vertex AI Search" nor "Agentspace" nor "Conversational Search" appears anywhere in the Braintrust tracing docs.

Upstream sources

Weekly downloads: 3,354,124 (as of 2026-08-17; source: https://pypistats.org/api/packages/google-cloud-discoveryengine/recent — the official sibling PyPI package google-cloud-discoveryengine, published by Google Cloud and covering the identical Discovery Engine API surface, used here as the primary-package adoption proxy since the Go module itself is not tracked by a download registry, following the same substitution pattern as prior issues in this repo for Go-only client libraries)

Braintrust docs sources

Local repo files inspected

  • go.mod — no cloud.google.com/go/discoveryengine dependency
  • trace/contrib/ — no discoveryengine/ directory; only genai/ and adk/ exist for Google integrations
  • trace/contrib/all/all.go — no discoveryengine import
  • trace/contrib/genai/tracegenai.go — routes on :generateContent and :embedContent only; no Discovery Engine paths
  • examples/ — no Discovery Engine example
  • Grep for discoveryengine, DiscoveryEngine, AnswerQuery, ConversationalSearch across all repo files — zero matches

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions