OpsCanary
observabilitygrafanaPractitioner

Telemetry-Driven Development: Confidence in Your Agents with gcx and Grafana MCP

5 min read Grafana BlogReviewed for accuracy
Share
PractitionerHands-on experience recommended

Telemetry-driven development exists to bridge the gap between code and its real-world behavior. By utilizing gcx and Grafana MCP, you can ensure your coding agents are not just writing code in a vacuum but are informed by actual telemetry data. This approach enhances your confidence in the agents' decisions and the overall system performance.

The gcx tool, a flexible command-line interface, allows agents to query telemetry directly from the terminal. This means agents can pull real telemetry data from production environments, which influences their implementation suggestions based on actual requirements and limitations. For instance, you can use the command 'gcx resources pull' to fetch the payments dashboard from production, ensuring that your agents are aligned with the current state of your system. Additionally, initializing agent skills with commands like 'k6 x agent init <target>' helps tailor the agents to your specific needs, enhancing their effectiveness.

In production, it’s crucial to remember that both gcx and Grafana MCP are now generally available, making them viable options for your telemetry needs. A useful tip is that you can continue Grafana Assistant conversations on the command line, which can provide valuable context for your coding agents. This feature can significantly streamline your workflow and improve the agents' decision-making capabilities.

Key takeaways

  • Utilize 'gcx resources pull' to fetch real telemetry data from production.
  • Install agent skills with 'gcx agent skills install' for enhanced functionality.
  • Initialize k6 agent skills using 'k6 x agent init <target>' to tailor agents to your needs.
  • Leverage Grafana Assistant on the command line for contextual conversations.
  • Monitor health with RED metrics: Rate, Error, and Duration.

Why it matters

In production, telemetry-driven development allows for data-informed decisions, reducing the risk of deploying code that doesn't meet real-world requirements. This leads to more reliable systems and improved service levels.

Code examples

Bash
gcx agent skills install
Bash
gcx resources pull
Bash
k6 x agent init <target>

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
DigitalOcean Serverless InferenceSponsor

OpenAI & Anthropic-compatible inference API — no GPU provisioning needed. 55+ models, pay-per-token with no minimums. VPC + zero data retention by default.

Try Serverless Inference →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.