google-agents-cli-observability

Configure tracing, prompt-response logging, and BigQuery analytics for deployed Google Cloud agents.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/Aki2022/skills --skill google-agents-cli-observability-aki2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: google-agents-cli-observability
Source: https://github.com/Aki2022/skills/tree/main/google-agents-cli-observability
Command: npx skills add https://github.com/Aki2022/skills --skill google-agents-cli-observability-aki2022

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Deployed AI agents are hard to debug and audit without telemetry. This Skill guides you through setting up distributed tracing, prompt-response logging, and analytics for agents built with Google's agents-cli, so you can monitor production traffic, audit LLM interactions, and troubleshoot failures. ## Core Features & Use Cases - Cloud Trace Setup: Distributed tracing via OpenTelemetry spans across agent invocations, LLM calls, and tool executions, with setup guidance per deployment target (Agent Runtime, Cloud Run, GKE, local). - Prompt-Response Logging: Export full GenAI prompts and responses to GCS and BigQuery using Terraform-provisioned log sinks, external tables, and completions views. - BigQuery Agent Analytics & Third-Party Integrations: Enable the ADK BigQuery analytics plugin for conversational analytics and LLM-as-judge evals, or connect platforms like AgentOps, Phoenix, MLflow, and Weave. - Use Case: After deploying an ADK agent to Agent Runtime, use this Skill to verify traces appear in Cloud Trace, confirm prompt-response data lands in BigQuery, and add a user-feedback endpoint that routes ratings into the telemetry dataset. ## Quick Start Ask the assistant to set up tracing and prompt-response logging for your deployed agents-cli agent and verify the telemetry data is flowing.

Frequently Asked Questions about google-agents-cli-observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Cloud Trace for an ADK agent?

Cloud Trace works out of the box in scaffolded projects. ADK apps wire exporters via get_fast_api_app(otel_to_cloud=True), and Agent Runtime gates telemetry on GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY. View traces in Cloud Console under Trace explorer.

How do I enable prompt-response logging to BigQuery?

Run agents-cli infra single-project to provision the GCS bucket, BigQuery dataset, and log sinks via Terraform. Set LOGS_BUCKET_NAME and OTEL_INSTRUMENTATION_GENAI_COMPLETION_HOOK=upload so completions export as JSONL to GCS and BigQuery.

Which third-party observability platforms work with ADK agents?

Supported platforms include AgentOps, Arize AX, Phoenix, MLflow, Monocle, Weave, and Freeplay, plus others like Datadog and LangWatch. Most ingest OpenTelemetry traces; setup pages live at adk.dev/integrations/<slug>/index.md.

Why are no traces appearing in Cloud Trace?

Verify the telemetry setup runs at startup, such as get_fast_api_app(otel_to_cloud=True) for ADK, and that the service account has the cloudtrace.agent IAM role. On Agent Runtime, confirm GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY is set by the deploy.

How do I keep prompt content out of trace spans?

Set OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=NO_CONTENT, which is the scaffolded default. Note that GCS and BigQuery completions still capture full content unless you remove LOGS_BUCKET_NAME and the completion hook from the Terraform service configuration.

When should I run agents-cli infra single-project relative to deploy?

For agent_runtime deployments, run agents-cli infra single-project before the first agents-cli deploy. Applying Terraform after an SDK-based deploy creates a state mismatch, since the module owns the entire Reasoning Engine resource.