Skip to main content

Quick Overview

This technical demonstration, presented by Shawn Pitts from Grafana Labs for Google Cloud Tech, explores production observability for AI agents. The video details how to instrument, monitor, and optimize an agent built on Google Gemini using Grafana Cloud AI Observability and the Grafana Sigil SDK. It addresses the challenge of scaling LLM monitoring beyond manual testing to automated production telemetry.

Key Points

  • 1.Manual prompt-by-prompt debugging fails when AI agents move to production environments serving hundreds or thousands of concurrent users.
  • 2.The Grafana Sigil SDK provides OpenTelemetry-native instrumentation that captures Gemini agent tool calls, execution decisions, and response latency without altering underlying business logic.
  • 3.Grafana Cloud AI Observability aggregates metrics including error rates, token consumption breakdown, cost estimations, and latency percentiles across model versions.
  • 4.Built-in AI evaluators and automated Slack assistants can diagnose operational bottlenecks such as rate-limit exhaustion and excessive token usage.
  • 5.Integration with Claude Code inside Slack allows engineering teams to close the remediation loop by generating and applying fixes to agent prompts and source code.

Summary

Shawn Pitts from Grafana Labs demonstrates how to monitor and optimize an AI financial assistant built on Google Gemini using Grafana Cloud AI Observability. While local development allows engineers to manually inspect individual LLM prompts and tweak system instructions, this approach breaks down when applications reach production and serve thousands of concurrent requests. Managing production workloads requires scalable telemetry to continuously track performance, errors, and costs.

The demonstration begins with the Google Agent Development Kit and the financial assistant application codebase in the Cursor editor. To capture agent execution, developers instantiate the Grafana Sigil client using Grafana Cloud endpoint settings and API keys. The SDK serves as an OpenTelemetry-native layer. Within the code, streaming generation blocks and tool execution functions are wrapped with Sigil method calls. These lightweight wrappers capture start times, parameters, input payloads, return values, and execution duration without modifying the underlying agent logic.

Once instrumented, agent metrics flow into Grafana Cloud. The AI Observability overview dashboard displays top-level telemetry, including total requests, average and P95 latency, error rates, time to first token, and total cost breakdown. Engineers can drill down into specific tabs such as Performance, Errors, Usage, and Tools. The Tools view lists specific tool executions, such as transaction queries, showing call frequency, latency percentiles, and associated conversation threads. The conversation inspection panel displays the exact prompt, assistant output, token usage, and AI judge quality evaluations marked with status indicators.

To eliminate manual dashboard investigations, Pitts showcases an automated diagnostic workflow inside a Slack operations channel. By tagging the Grafana bot with an investigation request, the assistant automatically reviews agent documentation, discovers infrastructure components, and analyzes telemetry data sources. The bot returns a structured summary highlighting active bottlenecks, including rate-limit exhaustion errors, token inflation caused by large transaction lookups, and latency spikes on Gemini 2.5 Pro.

The remediation cycle finishes by tagging Claude Code directly in the same Slack thread. Referencing the Grafana diagnostic report, Claude generates an action plan with code fixes, such as implementing client-side retry handling with exponential backoff and capping transaction query return sizes. This workflow establishes an automated loop of observing, analyzing, improving, and repeating across production AI agent deployments.

Observability Challenges for Production AI Agents

Developing and testing AI agents locally allows developers to review prompts, inspect responses, and manually tweak instructions in Markdown. However, when an application scales to thousands of concurrent users in production, inspecting individual requests becomes impossible. Standardizing monitoring requires an automated framework to capture model latency, tool execution, and request health across all interactions.

Instrumenting Gemini Agents with Grafana Sigil SDK

Integrating observability into an agent built with Gemini and the Google Agent Development Kit requires minimal code changes. Developers configure a Sigil client with their Grafana Cloud endpoint and credentials, then wrap generation streams and tool executions. This OpenTelemetry-native layer captures inputs, outputs, execution duration, and metadata without altering the core agent decision logic.

Analyzing Agent Performance and Error Rates in Grafana Cloud

Grafana Cloud AI Observability provides prebuilt dashboards displaying request counts, error rates, P95 latencies, token consumption, and cost estimates. The interface allows teams to inspect individual conversation threads and evaluate specific tool calls, such as transaction lookups. Additionally, AI judges score response quality and trigger alerts when suboptimal responses occur.

Automating Root-Cause Diagnosis and Remediation via Slack

Operations teams can automate incident investigations by connecting Grafana assistants and Claude Code to Slack channels. Querying Grafana in Slack triggers automated log and trace analysis to identify issues such as rate-limit errors or token inflation from unfiltered database queries. Developers can then prompt Claude Code directly within the thread to draft implementation plans and push code updates.

The Bottom Line

The video demonstrates how the Grafana Sigil SDK and Grafana Cloud AI Observability provide end-to-end telemetry and automated troubleshooting for Google Gemini agents in production. By combining dashboard analytics with AI evaluators and Slack-integrated assistants, developers can detect performance bottlenecks and generate targeted remediations. It leaves implementation specifics for custom evaluation criteria and proprietary production infrastructures to the viewer's environment.

FAQ

What is Grafana Cloud AI Observability and how does it monitor Google Gemini agents?

Grafana Cloud AI Observability is a monitoring solution that uses OpenTelemetry-based instrumentation through the Sigil SDK to collect traces, metrics, tool executions, token usage, and costs from Google Gemini agents in real time.

Why is manual prompt inspection insufficient for production Google Gemini agents?

Manual inspection works during local testing with single prompts, but it cannot scale when an agent handles hundreds or thousands of concurrent user requests in production.

How does the Grafana Sigil SDK integrate with Gemini agent code?

The Sigil SDK integrates by wrapping generation streams and tool executions with lightweight telemetry hooks configured via an instance ID, endpoint, and API key, without altering the core agent logic.

What key metrics are displayed in the Grafana Cloud AI Observability dashboard?

The dashboard displays request volume, error rates, P95 latency, time to first token, token consumption by type, model-specific cost estimates, and tool execution statistics.

How can teams automate agent investigations using the Grafana Slack integration and Claude?

Teams can prompt the Grafana assistant in Slack to analyze metrics, logs, and traces for bottlenecks, and then tag Claude in the thread to generate code fixes based on the diagnostic summary.

Worth watching for

Software engineers, cloud architects, and site reliability engineers building, deploying, or managing LLM agents and looking to automate agent monitoring and debugging in production.

  • google-cloud
  • grafana-cloud
  • gemini
  • ai-observability
  • opentelemetry
  • slack