Logs and analytics
View CDN traffic, cache hit ratio, status codes and geography, look up individual requests, and run site diagnostics.
CDN statistics are built from the access logs that edge nodes record. You can view them in three places: the account-wide Traffic analytics page, each domain's Traffic analytics tab, and the WAF analytics and Event log tabs on the Firewall page. Each domain also has a Diagnostics tool for troubleshooting configuration problems.
It takes a short while for access logs to travel from the edge to the analytics system, so the last few minutes of traffic may not appear yet. The console UI is currently in Chinese; this guide gives each label in Chinese, followed by an English translation.
Account-wide traffic analytics
Go to CDN管理 (CDN) → 流量分析 (Traffic analytics). The console URL is /cdn/analytics.
- Domain filter: shows totals for all of your CDN domains by default. You can pick a single domain instead.
- Time range: the default is the last 7 days. You can set it to the second.
The page shows:
| Section | Content |
|---|---|
| Total traffic | Response body bytes the edge sent to visitors in the time range |
| Total requests | Number of requests the edge handled |
| Cache hit ratio | Percentage of all requests answered from the edge cache (HIT or STALE) |
| Countries/regions | Number of countries or regions that sent traffic |
| Top domains | Traffic, requests and cache hit ratio for each domain |
| Traffic by region | Traffic and requests for each country or region |
| Top URLs | The most-requested paths, without the query string |
| HTTP status codes | Request count for each status code |
| Browsers | Browsers identified from the User-Agent |
Per-domain traffic analytics
Open a domain and select 流量分析 (Traffic analytics). The console URL is /cdn/domains/<domain>/traffic. Pick a time range in the top-right corner; the default is the last 7 days.
Overview
- Total requests, total traffic, cache hit ratio and average response time. The average response time is how long the edge took to handle a request, in seconds.
- Request counts for 2xx success, 3xx redirect, 4xx client error and 5xx server error.
- Top URLs, with the hits and traffic for each path.
- The HTTP status code breakdown.
A sudden rise in 5xx responses usually means the origin has a problem. Run Diagnostics (below) to check that the edge can reach the origin. If 4xx responses rise, check the Firewall Event log to see whether security rules are blocking requests.
Geography
A world map and a list of countries and regions, showing the requests and traffic from each. A visitor's location is worked out from the client IP address.
Request lookup
Look up individual access log entries in the selected time range.
- Fill in any of these filters: Request ID (exact match), URI (contains), status code or client IP.
- Click 查询 (Search). Results are listed newest first, with 20, 50, 100 or 200 entries per page.
- Click 查看详情 (View details) on an entry to see:
- Basic: time, host, method, status, full URL, scheme, client IP, request and response size, duration and cache status.
- Request headers: User-Agent, Referer, X-Forwarded-For, Accept-Language and more.
- Response headers: Content-Type, Cache-Control, ETag and Last-Modified, plus the values the origin returned.
- Upstream: origin address, origin status, and connect, header and response timings.
- SSL: TLS protocol version and cipher.
- Geo: country, region, city, ISP and ASN.
- CDN: the node that handled the request and the cache status.
Every response includes an X-Request-ID header, whose value is the Request ID used here. Use it to find a specific request when you troubleshoot or contact support.
WAF analytics and event log
Security events are on the Firewall page; see WAF and security.
- WAF analytics shows total events, blocks, attacking IPs and triggered rules. It also has an event timeline, the top triggered rules and the top attacking IPs. You can pick the last 1 hour, 24 hours, 7 days or 30 days, or set a custom range.
- Event log lists each blocked, challenged or rate-limited request. You can filter by action, IP and URI. Expand an entry to see the rule ID, rule type, message, and the key and value that matched.
Diagnostics
Open a domain and select 诊断 (Diagnostics). The console URL is /cdn/domains/<domain>/diagnostics.
- Select the hostname to check.
- Click 开始诊断 (Run diagnostics) and wait for it to finish.
Diagnostics runs the checks below. Each check returns pass, info, warning or error, with an explanation:
| Check | What it looks at |
|---|---|
| DNS resolution | Whether the hostname resolves to the CDN |
| Origin connectivity | Whether the edge can connect to the origin |
| Origin redirect | Whether the origin's HTTP-to-HTTPS redirect would cause a redirect loop with the current SSL mode |
| SSL mode consistency | Whether the SSL mode matches the origin protocol and port settings |
| Origin SSL certificate | Whether the origin certificate is valid and matches the hostname |
| Force HTTPS | Whether Force HTTPS conflicts with the certificate status |
| Mixed content | The risk of HTTPS pages loading HTTP resources |
| Protocol switches | Whether the combination of HTTP and HTTPS settings makes sense |
The top of the page also shows the domain's current SSL mode, Force HTTPS, HTTP and SSL status, so you can compare them with the results.
API
Every statistics endpoint needs startTime and endTime, in YYYY-MM-DD HH:mm:ss format. Add domain_id to limit the results to one domain.
curl -G "https://api.yeap.cloud/api/user/traffic/stats" \
-H "Authorization: Bearer <token>" \
--data-urlencode "startTime=2026-10-01 00:00:00" \
--data-urlencode "endTime=2026-10-07 23:59:59" \
--data-urlencode "domain_id=123"The response includes total_requests, total_traffic, avg_response_time and cache_hit_rate. Other endpoints:
| Endpoint | Returns |
|---|---|
GET /api/user/traffic/map | Statistics by country or region |
GET /api/user/traffic/top-urls | Top URLs |
GET /api/user/traffic/status-codes | Status code breakdown |
GET /api/user/traffic/browsers | Browser breakdown |
GET /api/user/traffic/top-domains | Top domains |
GET /api/user/cdn/domains/{domain}/traffic | Overview and time series for one domain |
GET /api/user/traffic/logs | Request log entries. Accepts request_id, uri, status, client_ip, page and pageSize; pageSize can be at most 200 |
POST /api/user/cdn/diagnostics/run | Runs diagnostics. Send {"hostname": "www.example.com"} as the body |
You can't currently download raw log files, stream logs in real time, or push logs to external storage. To export data, page through the request log endpoint.