Application Monitors
Alert on how your application is actually behaving — response time, error rate or throughput — measured from the traces it already sends, not from a probe.
How an application check works
An Application monitor doesn't send anything to your application. On every check it looks at the traces your application has sent to Zharp over a recent window — the last 5 minutes unless you change it — takes one measurement for a service, and compares it with your threshold. Because it measures real traffic, it sees what your users see.
Your application has to be sending traces first, and it measures the same data the Applications dashboard shows. If nothing is sending yet, add the app under Applications and install its SDK — see Getting Started — or point an existing OpenTelemetry setup at Zharp, as described in OpenTelemetry.
The service a monitor watches is the service.name its spans carry — the app's service name when you use a Zharp SDK, such as checkout-api.
| Alert on | What is measured | The check fails when |
|---|---|---|
| Response time (95th percentile) | The 95th percentile duration of the requests the service handled in the window | it is above the threshold |
| Response time (99th percentile) | The 99th percentile duration | it is above the threshold |
| Response time (average) | The average duration | it is above the threshold |
| Error rate | The share of those requests marked as errors, as a percentage | it is above the threshold |
| Throughput | The number of requests the service handled in the window | it is below the threshold |
| Error count | The number of errors the service reported in the window (exceptions captured by the SDK) | it is above the threshold |
| New error type | Errors first seen in the window, or back after being resolved; ignored errors don't count | there is at least one — it names them |
A value exactly on the threshold passes. A request is one of the service's entry spans: a SERVER span — an incoming call it handled — or a span with no parent, which is what a client starts for a page load, a navigation, a click that made requests or a mobile screen. The database queries, outgoing calls and other work traced inside each request aren't counted as requests of their own, so they don't pull the response time down or multiply the throughput. A request is an error when its span has status ERROR — on a server, a 5xx or an uncaught exception. To judge one endpoint on its own, choose it under Operation.
The check reads traces Zharp already holds rather than reaching out from a location, so the form has no Regions section for this type. Check frequency decides how often it runs; the window decides how much traffic each check looks at.
Create an application monitor
- 1Choose the type
On the Monitors page, click New, open the type picker and choose Application monitor. It is listed under Application & APIs.
- 2Pick the service
Service lists every service that has sent traces in the last 24 hours, by its
service.name. The first one is selected for you. If none has, the form shows Send traces to Zharp to start monitoring with an Add an app button, and the list reads No services reporting yet. - 3Narrow it to one operation, if you need to
Operation is All operations unless you pick one — the list holds the operations the service received in the last 24 hours — the names of its entry spans, such as
GET /checkoutorpageload /cart. Leave it on All operations unless one endpoint is what matters. - 4Set what to alert on
Choose the measurement under Alert on and set Threshold. Changing Alert on resets the threshold to that measurement's default, so a latency in milliseconds is never left standing as an error-rate percentage. Then choose the window under Measure over.
- 5Create it
Pick who is alerted under How should we escalate incidents? and click Create monitor. If you leave the name empty, the monitor is named after the service, followed by the operation when you picked one (
checkout-api · GET /checkout).
Settings
| Setting | Default | What it does |
|---|---|---|
| Service | The first service listed | The service to watch. Only services that sent traces in the last 24 hours are listed. |
| Operation | All operations | Limit the measurement to one operation of the service. |
| Alert on | Response time (95th percentile) | The measurement taken on each check — see the table above. |
| Threshold | Depends on Alert on | In the unit shown beside it: 1000 ms for the 95th percentile, 2000 ms for the 99th, 500 ms for the average, 5 % for error rate and 1 request for throughput. Any number from 0 up. |
| Measure over | Last 5 minutes | Last 5 minutes, Last 15 minutes, Last 30 minutes or Last hour. A shorter window reacts faster; a longer one is steadier and alerts less on a single slow request. |
Check frequency, the confirmation and recovery periods and the other settings every monitor has are described in Monitor Types.
30 alerts when fewer than 30 requests arrived in those 15 minutes. The default of 1 alerts only when the service went completely quiet.When there is no traffic
With no traces from the service in the window, there is nothing to measure a response time or an error rate on. The check records No traces from checkout-api in the last 5 minutes. and the monitor's status doesn't change: a new monitor stays pending, a monitor that was up stays up, and one that was down stays down, with its incident open, until traces arrive again and pass. A quiet night doesn't become an outage.
Throughput is the exception — no traffic is exactly what it watches for. Zero requests is below any threshold, so the check fails with checkout-api received no requests in the last 5 minutes. To be told when a service stops receiving traffic, or stops sending traces, add a second monitor on Throughput.
When it goes down
Each check records a sentence with the measurement, the window and, when it fails, the threshold it crossed. The service name comes first, followed by the operation when you picked one (checkout-api · GET /checkout).
| What happened | Message on the check |
|---|---|
| The measurement passed | checkout-api 95th percentile response time is 840ms over the last 5 minutes. |
| A response time went over the threshold | checkout-api 95th percentile response time is 1240ms over the last 5 minutes, above the 1000ms threshold. |
| The error rate went over the threshold | checkout-api error rate is 7.3% over the last 5 minutes, above the 5% threshold. |
| Throughput fell under the threshold | checkout-api throughput is 12 requests over the last 15 minutes, below the 30 requests threshold. |
| Throughput fell to zero | checkout-api received no requests in the last 5 minutes. |
| No traces in the window (other measurements) — status unchanged | No traces from checkout-api in the last 5 minutes. |
| The monitor has no service — status stays pending | No service selected. Choose the service this monitor should watch. |
Measurements are rounded to one decimal place. A failing check opens an incident like any other monitor, and the monitor comes back up — closing the incident — once a check passes again (after the recovery period, if you set one).
The monitor page
An application monitor's page shows the service as the traces describe it:
- The service and operation being watched, with HEALTHY, DEGRADED or NO TRAFFIC.
- Response time (p95) — a chart of the 95th percentile at each check, with the latest p50, p95 and p99.
- APDEX SCORE — a 0 to 1 score of how many requests in the window were fast enough: a request within the target counts fully, one within four times the target counts half, and a slower or failed one counts nothing. Rated HEALTHY, FAIR or POOR, with Error rate, Throughput per minute, p95 latency, the Apdex target and the number of Requests in the window. For a response-time monitor the target is your threshold, capped at 2,000 ms; for error rate and throughput it is 500 ms.
- Top endpoints — the slowest routes of the app with this service name, by p95 over the last hour, with requests per minute and error rate. On a response-time monitor, endpoints over your threshold are highlighted.
- Recent checks — one row per check with the operation doing worst, p95, error rate and throughput. Expand a row for the measurement against the threshold (BREACHED or WITHIN), the window, p50/p95/p99 and Apdex, and a link to a trace from the worst operation — the one with the highest error rate, else the slowest — preferring a failed request.
- The Service card with the settings in force and Open in Applications.
Troubleshooting
My service isn't in the list
Only services that sent requests in the last 24 hours are listed. Check that the app shows data under Applications — see the troubleshooting on Getting Started and your SDK's page — and that it sets the service name you expect. Two deployments reporting different names show up as two services. A service that sends only logs and errors, with no traced requests, isn't listed.
The monitor stays pending
Read the latest check under Recent checks. No traces from … in the last 5 minutes. means nothing arrived in the window: the service had no traffic, or traces stopped reaching Zharp. A longer Measure over window helps for services with little traffic.
It alerts on a single slow request
In a quiet window, a handful of requests decide the percentile. Measure over a longer window, alert on Response time (average), or set a Confirmation period so the breach has to last before anyone is alerted.
The numbers differ from the app's page
Both count the same entry spans, but over different windows: the monitor over its Measure over window, the dashboard over the window picked at the top of the page. An app on the dashboard also covers every service name sent with its key, while a monitor watches one service.name. Compare over the same time range.