tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Generative AI > Google Gemini API > ADK Custom Monitoring Dashboards

ADK Custom Monitoring Dashboards

Author: Venkata Sudhakar

Cloud Monitoring lets you create dashboards that give your team a real-time view of ADK agent health. For ShopMax India, a single dashboard showing request volume, p99 latency, tool error rates, and quality scores means on-call engineers can diagnose problems in seconds instead of digging through logs.

The example below writes custom metrics to Cloud Monitoring using the google-cloud-monitoring library. Each request records four metrics: request count, latency, tool errors, and quality score. These feed into dashboard widgets showing trends over time.


It gives the following output,

[u001] latency=1823ms quality=1.00: We have 88 units of SKU-100 in stock at the Mumbai warehouse.
[u002] latency=1756ms quality=1.00: We have 88 units of SKU-200 in stock at the Mumbai warehouse.
[u003] latency=1801ms quality=1.00: We have 88 units of SKU-300 in stock at the Mumbai warehouse.
[u004] latency=1834ms quality=1.00: We have 88 units of SKU-400 in stock at the Mumbai warehouse.
[u005] latency=1812ms quality=1.00: We have 88 units of SKU-500 in stock at the Mumbai warehouse.

After running this for a few minutes, navigate to Cloud Monitoring in the Google Cloud Console. Go to Dashboards and create a new dashboard. Add chart widgets using the metric types custom.googleapis.com/adk/latency_ms, custom.googleapis.com/adk/request_count, custom.googleapis.com/adk/tool_errors, and custom.googleapis.com/adk/quality_score. Set the aggregation to mean for latency and quality, and sum for request count and errors.

For ShopMax India, create separate dashboard rows for each agent (inventory, order support, pricing) so the on-call team can see at a glance which agent is having issues. Set up alerting policies on the latency_ms metric to page when p99 exceeds 5,000 ms, and on quality_score to alert when it drops below 0.7 for 5 consecutive minutes.


 
  


  
bl  br