Skip to content
DNS · Metrics

Analytics

Metrics and analytics

Edge DNS provides detailed metrics on query volume, response times and traffic patterns to help you understand how your domains are being used.

On this page7 sections

DNS metrics with query volume and record type breakdown

Available metrics#

  • Query count: total number of DNS queries received for your zone, broken down by time period.
  • Latency: average and maximum response times in microseconds. Typical resolution is under 10ms.
  • Query types: breakdown by record type (A, AAAA, MX, TXT, etc.) to understand query patterns.
  • Response codes: distribution of response types, such as NOERROR, NXDOMAIN and REFUSED.
  • Geographic distribution: query volume by country, based on resolver location (GeoIP).
  • Node distribution: which Edge nodes handled your queries, showing traffic distribution.

Time ranges#

View metrics at different granularities depending on your analysis needs:

Range Granularity Data points
Last hour 1 minute ~60 points
Last 24 hours 1 minute ~1,440 points
Last 7 days 1 hour ~168 points
Last 30 days 1 day ~30 points

Data retention#

Metrics are automatically aggregated and pruned to optimise storage while keeping useful historical data:

Granularity Data Retention
1m Minute-level data 24 hours
1h Hourly aggregates 7 days
1d Daily aggregates 90 days

Viewing metrics#

  1. Navigate to your zone. Go to DNS and select your domain.
  2. Click the Metrics tab. View charts and statistics for your zone.
  3. Select a time range. Choose 1h, 24h, 7d or 30d to adjust the view.

API access#

Fetch metrics programmatically for custom dashboards or monitoring.

Get zone metrics#

HTTP
GET /api/dns/zones/:id/metrics?range=24h

Response:

JSON
{
  "metrics": {
    "zone": "example.com",
    "from": "2024-01-14T00:00:00Z",
    "to": "2024-01-15T00:00:00Z",
    "granularity": "1m",
    "data": [
      {
        "timestamp": "2024-01-14T00:00:00Z",
        "queryCount": 1234,
        "byType": { "A": 800, "AAAA": 300, "MX": 134 },
        "byResponse": { "NoError": 1200, "NXDomain": 34 },
        "byCountry": { "US": 500, "GB": 300, "DE": 200 },
        "latencyAvgUs": 2500,
        "latencyMaxUs": 15000
      }
    ]
  }
}

Get account-wide DNS stats#

HTTP
GET /api/dns/stats

Response:

JSON
{
  "stats": {
    "totalQueries": 1234567,
    "avgLatencyMs": 8,
    "zoneCount": 5,
    "recordCount": 47
  }
}

Common use cases#

  • Traffic monitoring: track query volume over time to understand traffic patterns and identify unexpected spikes that might indicate issues or attacks.
  • Performance analysis: monitor latency metrics to ensure DNS resolution stays fast. Investigate whether max latency spikes occur during high-traffic periods.
  • Error detection: watch the response code distribution. High NXDOMAIN rates might indicate misconfigurations or broken links pointing to non-existent subdomains.
  • Geographic insights: see where your users are located based on query origins. Useful for planning geo routing or understanding your audience.

Next steps