Gemini CLI Extension: Observability — Monitoring & Logs
Gemini CLI extension for Google Cloud observability. Set up monitoring, analyze logs, create dashboards, and configure alerts.
Safe staging for this asset
This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.
npx -y tokrepo@latest install aa41279c-0695-4fd6-a8ec-f70e0f255cff --target codexStages files first; activation requires review of the staged README and plan.
What it is
The Gemini CLI Observability extension is an official Google extension that adds application monitoring and observability capabilities to the Gemini command-line interface. It assists with setting up monitoring for Google Cloud services, analyzing logs, creating dashboards, and configuring alerts.
It targets DevOps engineers, SREs, and platform teams who manage Google Cloud infrastructure and want AI assistance for complex observability tasks like writing MQL queries, setting up SLOs, or debugging production incidents.
How it saves time or tokens
Observability configuration involves verbose YAML, complex query languages (MQL, LogQL), and deep knowledge of metric naming conventions. This extension generates monitoring configurations, log queries, and dashboard definitions from natural language descriptions. Instead of reading documentation for the exact MQL syntax, you describe what you want to monitor and the extension produces the query. Estimated token usage is around 500 tokens per interaction.
How to use
- Install the extension:
gemini extensions install observability
- Analyze application logs:
gemini 'Show me error logs from the payment service in the last 24 hours'
- Create a monitoring dashboard:
gemini 'Create a Cloud Monitoring dashboard for my GKE cluster showing CPU, memory, and pod restart metrics'
Example
Generated MQL query for latency monitoring:
fetch gae_app
| metric 'appengine.googleapis.com/http/server/response_latencies'
| filter resource.module_id = 'default'
| align delta(1m)
| every 1m
| group_by [metric.response_code],
[latency_p99: percentile(value.response_latencies, 99)]
Related on TokRepo
- Monitoring tools — observability and monitoring resources
- DevOps tools — infrastructure and platform engineering tools
Common pitfalls
- Generated queries assume Google Cloud Monitoring (Stackdriver). They do not translate directly to Prometheus, Grafana, or Datadog query languages.
- Alert policies generated by the extension should be tested in staging before production. Incorrect thresholds can cause alert storms or missed incidents.
- The extension requires appropriate IAM permissions to access logs and metrics. Ensure the authenticated user has monitoring.viewer and logging.viewer roles.
Frequently Asked Questions
No. The observability extension is specific to Google Cloud Monitoring, Logging, and related services. For other platforms, use their native CLI tools or dedicated integrations.
Yes. Describe your service-level objectives in natural language, and the extension generates SLO configurations for Cloud Monitoring including availability and latency targets.
The extension can write Cloud Logging queries, summarize log patterns, identify error spikes, and correlate log entries across services. It understands structured logging fields and label filtering.
Yes. The extension can generate code for creating and writing custom metrics, as well as queries for monitoring them. Describe your metric in natural language and it produces the monitoring configuration.
The extension has specialized context about Google Cloud Monitoring APIs, MQL syntax, and observability best practices. It produces more accurate and actionable monitoring configurations than a generic LLM prompt.
Citations (3)
- Google Gemini CLI— Official Gemini CLI extensions for development workflows
- Google Cloud MQL— MQL for querying Google Cloud Monitoring metrics
- Google Cloud Logging— Cloud Logging query language for log analysis
Related on TokRepo
Source & Thanks
Created by Google. Licensed under Apache 2.0. gemini-cli-extensions/observability Part of Gemini CLI — ⭐ 99,400+
Discussion
Related Assets
Gemini CLI Extension: Workspace — Google Docs & Sheets
Gemini CLI extension for Google Workspace. Read, create, and edit Google Docs, Sheets, and Slides from your terminal.
Gemini CLI Extension: gcloud — Cloud CLI Operations
Gemini CLI extension for Google Cloud Platform. Deploy, configure, and manage GCP resources via natural language commands.
Gemini CLI Extension: Stitch — AI Design Tool
Gemini CLI extension for Google Stitch. AI-driven UI design, component generation, and design system management.
Gemini CLI Extension: Jules — Async Coding Agent
Gemini CLI extension by Google. Asynchronous coding agent for autonomous bug fixes, refactoring, and feature implementation.