Docs
DocumentationQuery ReferenceAPI Reference
Open Console→→
DocumentationQuery ReferenceAPI Reference

Platform overview

What is Axiom?QuickstartArchitectureFeatures
Fundamentals
Datasets
Edge deployments
Limits
Performance
Optimize usage
Requirements
Semantic conventions
Glossary
Tour
SecurityRoadmap

Send data

Reference architecturesMethods

Understand data

Console
Query
Builder
Editor
Query results
Visualize
Traces
Metrics
Correlations
Save queries
Stream
Dashboard
Create
Elements
Create
Configure
Element types
Gauge
Heatmap
Log stream
Monitor list
Note
Pie chart
Scatter plot
Statistic
Table
Time series
Sections
Configure
Filter
Annotate
Monitor
Overview
View status
Configure
Examples
Monitor types
Anomaly
Match
Threshold
Alerting
Overview
Configure
Notifier types
Custom Webhook
Discord
Email
Microsoft Teams
Opsgenie
PagerDuty
Slack
Manage
Datasets
Overview
Views
Virtual fields
Access
RBAC
Tokens
CLI
Organization
Audit log
Settings
Usage and billing
Profile
Extend
Overview
AWS Lambda
AWS PrivateLink
Cloudflare Workers
Cloudflare Logpush
Convex
Grafana
Hex
Netlify
Supabase
Tailscale
Terraform
Vercel
Intelligence
Overview
Spotlight
AI agents
Overview
MCP Server
Query cost limits
Agent-created orgs
Skills
Overview
Axiom alerting
Build dashboards
Control costs
Query metrics
SRE
Translate SPL to APL
Splunk
Overview
Splunk app
Install and configure
Commands
Examples
Splunk Portal
How it works
Set up standard mode
Set up transparent mode
Observability Cloud
SPL command support
Examples
Monitor and troubleshoot

Use cases

ObservabilityProduct analytics
LLM observability
Overview
Use Axiom AI SDK
Manual instrumentation
GenAI attributes
Redaction policies

Miscellaneous

LLMs
Overview
List of docs pages
Full docs
Query reference
FAQs
Legal
Acceptable use policy
Cookies
Data processing
HIPAA
Partner agreement
Partner program guide
Privacy policy
SLA
Terms of service
Terms of use
Understand data/AI agents

Query metrics skill

This page explains how to use the Query metrics skill to give AI coding agents the ability to query and explore OpenTelemetry metrics in Axiom's MetricsDB.

The Query metrics skill turns AI agents into metrics exploration experts:

  • Metrics query specification: Self-describing query endpoint that teaches the agent how to write metrics queries on demand
  • Metrics discovery: Explore available metrics, tags, and tag values in any OTel metrics dataset
  • Query execution: Compose and run metrics queries with filtering, aggregation, and grouping
  • Error handling: Structured error reporting with trace IDs for backend debugging

Prerequisites

  • Create an Axiom account.
  • Create a dataset in Axiom where you send your data.
  • Create an API token in Axiom with permissions to ingest data to the dataset you have created.
Info

The target dataset must be an OTel metrics dataset.

Install Axiom Skills

Install all Axiom skills at once for Claude Code, Cursor, and other Claude-compatible agents:

shell
npx skills add axiomhq/skills

Configure Axiom credentials

All Axiom Skills share the same credential configuration. Create a configuration file at ~/.axiom.toml:

TOML
[deployments.dev]
url = "https://api.axiom.co"
token = "API_TOKEN"
org_id = "ORGANIZATION_ID"
edge_url = "AXIOM_DOMAIN"
Info

Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.

Replace ORGANIZATION_ID with your organization ID. For more information, see Determine organization ID.

Replace AXIOM_DOMAIN with the base domain of your edge deployment. For more information, see Edge deployments.

For token creation and scoping guidance, see Token hygiene for AI agents.

Use Query metrics skill

The Query metrics skill activates automatically when you ask your AI agent to:

  • Query metrics data from Axiom MetricsDB
  • Explore available metrics, tags, and tag values in a dataset
  • Investigate OTel metrics data
  • Check metric values for debugging or monitoring

Example prompts:

  • "Query the CPU usage metric from the app.metrics dataset"
  • "What metrics are available in the dataset?"
  • "Show the tag values for the service.name tag"
  • "Find metrics related to HTTP requests"

How it works

The Query metrics skill uses a structured workflow:

  1. Learn the query specification: The agent calls the self-describing query endpoint to fetch the full metrics query specification.
  2. Discover metrics: The agent searches for metrics matching relevant terms or lists available metrics in the target dataset using the discovery endpoints.
  3. Explore tags: The agent lists tags and tag values to understand the available filtering options.
  4. Write and execute query: The agent composes a metrics query and runs it against MetricsDB.
  5. Iterate: The agent refines filters, aggregations, and groupings based on results.
Was this page helpful?
Suggest edits on GitHub
PreviousControl costs skillNextSystem Reliability Engineering (SRE) skill
On this page
Use Query metrics skillHow it works