Skip to content

Metrics

Temp edited this page Dec 9, 2025 · 5 revisions

Metrics

The Metrics tab provides analytics and performance insights for your Cloudflare KV namespaces, powered by Cloudflare's GraphQL Analytics API.

Accessing Metrics

Click the Metrics tab in the main navigation (between Search and Job History) to view the metrics dashboard.

Features

Namespace Filter

Select a specific namespace or choose "All Namespaces" to view aggregate metrics across your account.

Date Range

Choose from preset date ranges:

  • Last 7 days (default)
  • Last 14 days
  • Last 30 days
  • Last 90 days

Summary Cards

View key metrics at a glance:

  • Total Operations: Combined count of all KV operations
  • Reads: Total read operations with percentage
  • Writes: Total write operations with percentage
  • Data Points: Number of metric records collected

Operations Breakdown

Visual progress bars show the distribution of operations by type:

  • Read
  • Write
  • Delete
  • List

Latency Statistics

Table displaying average latency percentiles by operation type:

  • P50: Median latency (50th percentile)
  • P90: 90th percentile latency
  • P99: 99th percentile latency

Caching & Refresh

  • Metrics data is cached for 2 minutes to reduce API calls
  • Click the Refresh button to bypass the cache and fetch the latest data
  • Automatic exponential backoff handles rate limiting gracefully

API Reference

GET /api/metrics

Fetch account-wide KV metrics.

Query Parameters:

  • days (optional): Number of days to query (default: 7)
  • startDate (optional): Start date in YYYY-MM-DD format
  • endDate (optional): End date in YYYY-MM-DD format
  • skipCache (optional): Set to true to bypass cache

GET /api/metrics/:namespaceId

Fetch metrics for a specific namespace.

Path Parameters:

  • namespaceId: The KV namespace ID

Query Parameters: Same as above

Response Format

{
  "namespaceId": "abc123" | null,
  "startDate": "2024-12-01",
  "endDate": "2024-12-09",
  "totalOperations": 15420,
  "operationsByType": {
    "read": 12000,
    "write": 3000,
    "delete": 400,
    "list": 20
  },
  "avgLatencyMs": {
    "read": { "p50": 2.5, "p90": 5.1, "p99": 12.3 },
    "write": { "p50": 15.2, "p90": 28.4, "p99": 45.7 }
  },
  "dataPoints": [
    {
      "date": "2024-12-09",
      "actionType": "read",
      "requests": 1500,
      "latencyMsP50": 2.4,
      "latencyMsP90": 4.8,
      "latencyMsP99": 11.2
    }
  ]
}

Notes

  • Metrics data comes from Cloudflare's Analytics API and may have a delay of a few minutes
  • Data is retained for approximately 3 months
  • The API token must have Account Analytics:Read permission to access metrics

See Also

Clone this wiki locally