The Google client (clients/google) can run against either the Gemini API (BackendGemini) or Vertex AI (BackendVertexAI), selected via NewClientOptions.Backend. The google.chat_complete and google.embed spans record ai.model but not which backend served the request.
This matters most behind the robust wrapper. When a consumer registers a Gemini primary with a Vertex fallback, a fallover is only visible via ai.robust.completer_index (1 = the second completer). That index's meaning is encoded in registration order, far from the telemetry: it silently flips if the completers are reordered, and a human (or an MCP agent) reading a trace can't tell what index 1 means without going to read the wiring code.
Request
Have the Google client set the backend as a span attribute on both google.chat_complete and google.embed — the client already knows its Backend. Either:
ai.backend = gemini | vertexai (matches the existing ai.* namespace), or
- the OTel-standard
gen_ai.system.
Then fallback traffic is greppable by name, independent of completer registration order.
Note
This overlaps with #246 (renaming Vertex AI to Gemini Enterprise Agent Platform) — whatever naming lands there should be the attribute value here.
Filed via Claude Code: https://claude.ai/code/session_01SxCXEQU7DLKw6p9B7kJ5Ej
The Google client (
clients/google) can run against either the Gemini API (BackendGemini) or Vertex AI (BackendVertexAI), selected viaNewClientOptions.Backend. Thegoogle.chat_completeandgoogle.embedspans recordai.modelbut not which backend served the request.This matters most behind the
robustwrapper. When a consumer registers a Gemini primary with a Vertex fallback, a fallover is only visible viaai.robust.completer_index(1= the second completer). That index's meaning is encoded in registration order, far from the telemetry: it silently flips if the completers are reordered, and a human (or an MCP agent) reading a trace can't tell what index1means without going to read the wiring code.Request
Have the Google client set the backend as a span attribute on both
google.chat_completeandgoogle.embed— the client already knows itsBackend. Either:ai.backend=gemini|vertexai(matches the existingai.*namespace), orgen_ai.system.Then fallback traffic is greppable by name, independent of completer registration order.
Note
This overlaps with #246 (renaming Vertex AI to Gemini Enterprise Agent Platform) — whatever naming lands there should be the attribute value here.
Filed via Claude Code: https://claude.ai/code/session_01SxCXEQU7DLKw6p9B7kJ5Ej