Read a project's insights
Before you begin
- Role
- Viewer or higher.
Insights show how a project’s traffic changes over time: how many requests it answered, how many a mock matched, its errors and response times, and which endpoints are busiest or missing.
-
Open the project’s Insights tab.
-
Choose the period: Last 24 hours, Last 7 days or Last 30 days.
-
For the last 7 days, choose By hour or By day for the chart. The 24-hour view is always by hour and the 30-day view by day.
-
Open Metric, which shows Requests at first, and choose what the Over time chart plots: Requests, Match rate, Error rate, Average latency or p95 latency.
Insights do not update by themselves; Refresh insights, the round button beside the period, reads them again.
What each part shows
Section titled “What each part shows”
| Part | Shows |
|---|---|
| Requests | Every request in the period, with how many a mock matched and how many were forwarded to the upstream (proxied) |
| Match rate | The share of requests a mock answered |
| Error rate | The share answered with a 5xx status, whether it came from a mock, the upstream or MockHub itself |
| p95 latency | The time within which 95% of requests were answered, with the average and the slowest |
| Over time | The chosen measure for each hour or day of the period, labelled in UTC |
| Unmatched requests | The ten endpoints callers asked for most that no mock answered; see Find requests no mock matched |
| Busiest endpoints | The ten endpoints with the most requests, each with its Match rate, Avg latency, the average delay its mocks added, and when it was Last seen |
An endpoint is a method and a path, with numbers, UUIDs and hexadecimal strings of 16 characters or more counted as {id}: GET /orders/8821 and GET /orders/8822 are both GET /orders/{id}.
Response times cover the whole trip through MockHub but leave out any delay a mock adds, so a mock you made slow on purpose does not read as a slow API. A request log still shows what the client waited, delay included. Under Avg latency, Busiest endpoints shows the delay mocks added on average, such as “+ 1500 ms delay”; the two add up to the average wait. The ? beside p95 latency and Avg latency says the same. The average and the slowest are exact. The p95 is read from fixed time ranges, so it is accurate to within one range, never lower than the truth and never above the slowest.
Requests a running chaos profile shaped are left out of every part of the page: the totals, the rates, the chart and both tables. When there were any in the period, the page says how many, such as “37 requests caused by chaos are left out.”, Requests adds “37 caused by chaos”, and See them in the request log lists them.
The page states the period it actually counted, such as “Showing Sep 23, 09:00 – Sep 30, 10:00.”: the one you chose, widened to whole hours or days.
How far back insights reach
Section titled “How far back insights reach”The totals, the chart and both tables are counted as traffic arrives, and kept for the number of days the workspace’s plan provides; the limits page lists them. Hour-by-hour detail of the chart covers the last 14 days, so an older period is shown by day.
Unmatched requests and Busiest endpoints do not depend on the request logs once a request is counted: they keep an endpoint after its logs are removed, whether the plan’s period ended, the workspace reached its log row or storage limit, or you deleted them. For Last 24 hours the tables count whole hours; for a longer period they count whole days in UTC.
When the period you chose is longer than the plan keeps insights, the page says “This period is longer than this plan keeps.” and how far back it reaches.
Forget an endpoint
Section titled “Forget an endpoint”Deleting request logs does not take an endpoint out of the tables. To remove one, such as a path that carried someone’s real details, an Editor selects Forget on its row in either table and confirms with Forget endpoint.
The endpoint leaves both tables for every period. Its request logs are not deleted, and the totals and the chart keep counting its requests. It is listed again once it is called again. This cannot be undone.
Contract health
Section titled “Contract health”With a project’s background contract checks on, choose Contract health beside the period to read what they found over the same period. The page shows a sample of the traffic, not the traffic: its figures are headed Invalid, of sampled checks with a result and always show how many checks were sampled.
Result
Section titled “Result”The page shows the totals, the chart and the two tables for the period. The period, bucket size and measure are part of the page’s address, so a copied link shows the same view, counted back from when it is opened.
Limits
Section titled “Limits”- Requests forwarded to the upstream count as unmatched, because no mock answered them. In Proxy unmatched mode they lower the match rate and appear in Unmatched requests.
- A request that got the
404because no mock matched is counted only while Log requests no mock answered is on in the project’s settings, as it is for a new project. While it is off, the page says “Unmatched request logging is off.”, and Match rate counts only the misses that are always recorded: requests forwarded to the upstream. - A request the mock server gave no answer to, because it could not be reached, counts in the totals and the error rate as a
502, but not in Match rate, Unmatched requests or Busiest endpoints: whether a mock would have matched it is unknown. - A connection fault cannot be seen as such: MockHub puts a failed connection down to chaos while a profile with connection faults runs and covers the path. A mock server that fails during that time is left out too.
- Requests logged before MockHub tagged chaos carry no tag, and count as ordinary traffic.
- Posts to the webhook inbox are left out of the totals, the chart and Unmatched requests, but appear in Busiest endpoints. Requests refused before they reached the project, such as those over a rate limit, are not counted anywhere.
- The chart counts and labels its hours and days in UTC, and says so above it. The period it states and Last seen are in your browser’s time zone, so a request late in the evening west of UTC can fall in the next day’s bucket.
- The tables count only requests stored as request logs. While Store request logs is off in the project’s settings, the totals and the chart keep counting and the tables stay empty.
- The tables keep at most 2,000 endpoints for each hour and day, and once 1,000 are kept a new one is added only if a mock answered it. When part of a period’s traffic is missing from a table for either reason, the table says “This list may miss some of the period: part of its traffic was not logged, or reached more endpoints than a list keeps.”
- The tables show the top ten endpoints, and nothing can be exported.
- Contract health has its own limits, described in Watch for contract drift in the background.