PluginBench
Skill
Fail
Audit score 45

adk-observability-guide

google/adk-docs

Configure monitoring, tracing, and logging for ADK agents—Cloud Trace, prompt-response logging, BigQuery analytics, and third-party integrations.

What is adk-observability-guide?

Essential reference for setting up observability on ADK agents before deployment or when debugging production behavior. Covers distributed tracing via Cloud Trace, GenAI interaction logging, BigQuery analytics, and integrations with AgentOps, Phoenix, MLflow, and other platforms.

  • Enable Cloud Trace for distributed tracing of agent execution flow, latency, and errors via OpenTelemetry spans
  • Configure prompt-response logging to GCS, BigQuery, and Cloud Logging with privacy-preserving metadata-only mode by default
  • Set up BigQuery Agent Analytics plugin for structured agent events, tool provenance, and custom dashboards
  • Integrate with third-party observability platforms (AgentOps, Phoenix, MLflow, Weave, Arize, Monocle, Freeplay)
  • Troubleshoot missing traces, logging failures, privacy misconfigurations, and telemetry cost optimization

How to install adk-observability-guide

npx skills add https://github.com/google/adk-docs --skill adk-observability-guide
Prerequisites
  • ADK scaffolded project or manual OpenTelemetry setup in your FastAPI app
  • Google Cloud project with Cloud Trace, Cloud Logging, and BigQuery APIs enabled
  • Service account with appropriate IAM roles (cloudtrace.agent, storage.objectCreator, bigquery.dataEditor)
  • Environment variables configured (LOGS_BUCKET_NAME, BQ_ANALYTICS_DATASET_ID, OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT)
Claude Code
Cursor
Windsurf
Cline

How to use adk-observability-guide

  1. 1.Determine which observability tier(s) you need: Cloud Trace (always on), Prompt-Response Logging, BigQuery Analytics, or third-party integrations
  2. 2.For scaffolded projects, verify Cloud Trace and logging are pre-configured via Terraform; check references/cloud-trace-and-logging.md for env vars and verification commands
  3. 3.For manual setup, configure OpenTelemetry exporter in your FastAPI app and set otel_to_cloud=True
  4. 4.Set OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT to NO_CONTENT (metadata-only, default), true (full content), or false (disabled)
  5. 5.Enable BigQuery Agent Analytics with --bq-analytics flag at scaffold time if needed; configure third-party integrations per provider docs
  6. 6.View traces in Cloud Console → Trace → Trace explorer; verify logs in Cloud Logging and BigQuery external tables
  7. 7.Troubleshoot using the provided table: check service account roles, env vars, and provider-specific configuration

Use cases

Good for
  • Debugging agent latency and execution flow in production using Cloud Trace span hierarchies
  • Auditing LLM interactions and ensuring compliance with prompt-response logging to BigQuery
  • Analyzing agent behavior and building custom dashboards with BigQuery Agent Analytics
  • Monitoring deployed agents on Cloud Run or GKE with pre-configured Terraform infrastructure
  • Integrating with team collaboration platforms like W&B Weave or AgentOps for session replays and visualization
Who it's for
  • DevOps engineers configuring monitoring for deployed ADK agents
  • ML engineers analyzing agent performance and LLM interaction patterns
  • Platform teams setting up observability infrastructure with Terraform
  • Developers debugging agent behavior in local and production environments
  • Teams using third-party observability platforms for collaboration and evaluation

adk-observability-guide FAQ

Is Cloud Trace always enabled?

Yes. Cloud Trace is automatic for Agent Engine, Cloud Run, and GKE deployments. It works locally with make playground and is always on by default.

What is the difference between NO_CONTENT and true for OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT?

NO_CONTENT logs only metadata (model name, tokens, timing) for privacy; true logs full prompt and response content. NO_CONTENT is the default in deployed environments.

Do I need BigQuery Agent Analytics or can I use Cloud Trace alone?

Cloud Trace is sufficient for debugging latency and execution flow. BigQuery Agent Analytics is optional and best for conversational analytics, custom dashboards, and LLM-as-judge evaluations.

Which third-party platform should I use?

AgentOps for session replays with minimal setup; Phoenix for open-source with custom evaluators; MLflow for OTel trace visualization; W&B Weave for team collaboration; Arize AX for production monitoring.

How do I reduce telemetry costs?

Switch to NO_CONTENT mode for prompt-response logging, reduce BigQuery retention, or disable unused observability tiers.

Full instructions (SKILL.md)

Source of truth, from google/adk-docs.


name: adk-observability-guide description: > MUST READ before setting up observability for ADK agents or when analyzing production traffic, debugging agent behavior, or improving agent performance. ADK observability guide — Cloud Trace, prompt-response logging, BigQuery Agent Analytics, third-party integrations, and troubleshooting. Use when configuring monitoring, tracing, or logging for agents, or when understanding how a deployed agent handles real traffic. metadata: license: Apache-2.0 author: Google

ADK Observability Guide

Scaffolded project? Cloud Trace and prompt-response logging are pre-configured by Terraform. See references/cloud-trace-and-logging.md for infrastructure details, env vars, and verification commands.

No scaffold? Follow the ADK docs links below for manual setup. For production infrastructure, scaffold with /adk-scaffold.

Reference Files

FileContents
references/cloud-trace-and-logging.mdScaffolded project details — Terraform-provisioned resources, environment variables, verification commands, enabling/disabling locally
references/bigquery-agent-analytics.mdBQ Agent Analytics plugin — enabling, key features, GCS offloading, tool provenance

Observability Tiers

Choose the right level of observability based on your needs:

TierWhat It DoesScopeDefault StateBest For
Cloud TraceDistributed tracing — execution flow, latency, errors via OpenTelemetry spansAll templates, all environmentsAlways enabledDebugging latency, understanding agent execution flow
Prompt-Response LoggingGenAI interactions exported to GCS, BigQuery, and Cloud LoggingADK agents onlyDisabled locally, enabled when deployedAuditing LLM interactions, compliance
BigQuery Agent AnalyticsStructured agent events (LLM calls, tool use, outcomes) to BigQueryADK agents with plugin enabledOpt-in (--bq-analytics at scaffold time)Conversational analytics, custom dashboards, LLM-as-judge evals
Third-Party IntegrationsExternal observability platforms (AgentOps, Phoenix, MLflow, etc.)Any ADK agentOpt-in, per-provider setupTeam collaboration, specialized visualization, prompt management

Ask the user which tier(s) they need — they can be combined. Cloud Trace is always on; the others are additive.


Cloud Trace

ADK uses OpenTelemetry to emit distributed traces. Every agent invocation produces spans that track the full execution flow.

Span Hierarchy

invocation
  └── agent_run (one per agent in the chain)
        ├── call_llm (model request/response)
        └── execute_tool (tool execution)

Setup by Deployment Type

DeploymentSetup
Agent EngineAutomatic — traces are exported to Cloud Trace by default
Cloud Run (scaffolded)Automatic — otel_to_cloud=True in the FastAPI app
GKE (scaffolded)Automatic — otel_to_cloud=True in the FastAPI app
Cloud Run / GKE (manual)Configure OpenTelemetry exporter in your app
Local devWorks with make playground; traces visible in Cloud Console

View traces: Cloud Console → Trace → Trace explorer

For detailed setup instructions (Agent Engine CLI/SDK, Cloud Run, custom deployments), fetch https://adk.dev/integrations/cloud-trace/index.md.


Prompt-Response Logging

Captures GenAI interactions (model name, tokens, timing) and exports to GCS (JSONL), BigQuery (external tables), and Cloud Logging (dedicated bucket). Privacy-preserving by default — only metadata is logged unless explicitly configured otherwise.

Key env var: OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT — set to NO_CONTENT (metadata only, default in deployed envs), true (full content), or false (disabled). Logging is disabled locally unless LOGS_BUCKET_NAME is set.

For scaffolded project details (Terraform resources, env vars, privacy modes, enabling/disabling, verification commands), see references/cloud-trace-and-logging.md.

For ADK logging docs (log levels, configuration, debugging), fetch https://adk.dev/observability/logging/index.md.


BigQuery Agent Analytics Plugin

Optional plugin that logs structured agent events to BigQuery. Enable with --bq-analytics at scaffold time. See references/bigquery-agent-analytics.md for details.


Third-Party Integrations

ADK supports several third-party observability platforms. Each uses OpenTelemetry or custom instrumentation to capture agent behavior.

PlatformKey DifferentiatorSetup ComplexitySelf-Hosted Option
AgentOpsSession replays, 2-line setup, replaces native telemetryMinimalNo (SaaS)
Arize AXCommercial platform, production monitoring, evaluation dashboardsLowNo (SaaS)
PhoenixOpen-source, custom evaluators, experiment testingLowYes
MLflowOTel traces to MLflow Tracking Server, span tree visualizationMedium (needs SQL backend)Yes
Monocle1-call setup, VS Code Gantt chart visualizerMinimalYes (local files)
WeaveW&B platform, team collaboration, timeline viewsLowNo (SaaS)
FreeplayPrompt management + evals + observability in one platformLowNo (SaaS)

Ask the user which platform they prefer — present the trade-offs and let them choose. For setup details, fetch the relevant ADK docs page from the Deep Dive table below.


Troubleshooting

IssueSolution
No traces in Cloud TraceVerify otel_to_cloud=True in FastAPI app; check service account has cloudtrace.agent role
Prompt-response data not appearingCheck LOGS_BUCKET_NAME is set; verify SA has storage.objectCreator on the bucket; check app logs for telemetry setup warnings
Privacy mode misconfiguredCheck OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT value — use NO_CONTENT for metadata-only, false to disable
BigQuery Analytics not loggingVerify plugin is configured in app/agent.py; check BQ_ANALYTICS_DATASET_ID env var is set
Third-party integration not capturing spansCheck provider-specific env vars (API keys, endpoints); some providers (AgentOps) replace native telemetry
Traces missing tool spansTool execution spans appear under execute_tool — check trace explorer filters
High telemetry costsSwitch to NO_CONTENT mode; reduce BigQuery retention; disable unused tiers

Deep Dive: ADK Docs (WebFetch URLs)

For detailed documentation beyond what this skill covers, fetch these pages:

TopicURL
Observability overviewhttps://adk.dev/observability/index.md
Agent activity logginghttps://adk.dev/observability/logging/index.md
Cloud Trace integrationhttps://adk.dev/integrations/cloud-trace/index.md
BigQuery Agent Analyticshttps://adk.dev/integrations/bigquery-agent-analytics/index.md
AgentOpshttps://adk.dev/integrations/agentops/index.md
Arize AXhttps://adk.dev/integrations/arize-ax/index.md
Phoenix (Arize)https://adk.dev/integrations/phoenix/index.md
MLflow tracinghttps://adk.dev/integrations/mlflow/index.md
Monoclehttps://adk.dev/integrations/monocle/index.md
W&B Weavehttps://adk.dev/integrations/weave/index.md
Freeplayhttps://adk.dev/integrations/freeplay/index.md