What is API monitoring? Availability, latency, and response checks
Learn what API monitoring measures, how to test an authenticated HTTP response, and how to investigate failures with metrics, logs, and traces.
An inventory API can return 200 OK while sending "stock": null. If the checkout service expects a number, that response breaks the purchase flow. A stock count of zero is a different outcome. It tells checkout to show that the item is out of stock.
API monitoring tracks whether endpoints meet the expectations of the systems that call them. A scheduled probe checks a known request even when traffic is quiet. Production metrics, logs, and traces show what happened to the requests that actually arrived. An inventory endpoint can pass its probe for one item while timing out for customers in a particular warehouse.
Define what a successful response looks like
Suppose GET /v1/inventory/SKU-42 looks up stock for a dedicated test item. It requires authentication and should return HTTP 200 with a non-negative integer in stock. Start with those checks, then give the probe a latency threshold that reflects how long its caller can wait.
| Probe outcome | What it tells you |
|---|---|
HTTP 200 with {"stock":0}, within the latency target |
The request succeeded and the item is out of stock |
HTTP 200 with {"stock":null} |
The server responded, but the response broke the caller's contract |
| HTTP 401 from the authenticated probe | Investigate the probe credential and the authentication path |
| No response before the probe deadline | The probe timed out. Compare its network path and server telemetry before assigning a cause |
A correct response in three seconds is already late if checkout gives the inventory API two seconds. Track slow responses separately from timeouts and status or content failures. On the production side, break down request volume, error rate, and tail latency by endpoint or operation. A single probe's timings describe its route and input. Production percentiles describe the traffic represented by the collected metrics. Google SRE's four golden signals
Probe from the caller's network
An HTTP check is a black-box view of the endpoint from the probe node. A public partner API should be checked from a network path representative of its consumers. A private inventory service needs a node that can resolve its DNS name and reach it over the intended network. An external path through a gateway and an internal path straight to the service can fail for different reasons. Keep those results separate. Synthetic monitoring and probe locations
For a third-party payment or messaging API, check whether the provider permits synthetic traffic and use an approved test endpoint or account. A vendor sandbox tells you how the sandbox behaves. In production, the application's own dependency metrics can help distinguish credential failures, rate limiting, network timeouts and provider errors. A failure from one node only establishes what that node observed.
Check authenticated reads before adding writes
Use a dedicated credential with the minimum permission needed for the check. With Guance HTTP synthetic tests, you can configure headers, HTTP credentials or a client certificate to match the API's requirements. Use Pipeline script mode when a condition has to inspect a parsed JSON field such as stock. If the response can contain sensitive data, the privacy setting can prevent saving its body. Keep credentials and raw responses out of alert messages.
An intentionally unauthenticated request can check for 401 Unauthorized. A request using a disallowed method can check for 405 Method Not Allowed. Those outcomes test specific rejection paths. Keep them separate from the check that exercises an authenticated success. When a service requires a short-lived token, use an approved renewal process. A Guance multistep test can pass a value extracted from one HTTP response into a later request when the authentication flow fits that model.
If the risk is on the write path, exercise it in an isolated test environment with dedicated data. A request that times out at the probe might still create a record or trigger downstream work. Plan how to find and remove test records even after a timeout, and only retry a write when the API's idempotency or deduplication contract makes it safe. HTTP method and status semantics
Read a probe failure alongside production traffic
The connection test in Guance checks the configuration independently of the selected nodes. After setting the schedule, check the results from the actual nodes before configuring the detection and recovery rules. An alert should identify the endpoint, node, time and failed condition. Set its window according to how quickly you need to detect a failure and how often that node runs the check. Requiring multiple failures can reduce noise and can also delay detection. Synthetic test anomaly detection
Say the inventory probe starts returning stock: null right after a deployment. Look at errors and latency for the inventory endpoint in the same window. In Guance APM, inspect traces from the instrumented services and use correlated logs where available. If the probe sent a safe correlation ID that the service recorded, use it to find the corresponding request. Otherwise, match by endpoint, time and environment. A network or gateway failure may never reach the instrumented service and therefore leave no application trace.
The probe's success rate is the percentage of scheduled observations that met the configured conditions, using the denominator you define for that measurement. A customer-facing SLO may instead use the share of eligible production requests that succeeded. Keep the two numbers separate, especially when a quiet test item keeps working while a subset of live requests fails. Uptime monitoring and availability
Contact us
Join the community
to join the community
Try Guance
Start online and pay only for what you use.
Get startedChoose a Guance plan
