ARMS Browser Monitoring collects performance, stability, and API metrics from web pages and mini programs. This page defines each metric, its calculation formula, and the fields available in Browser Monitoring logs.
Performance metrics are collected through the Navigation Timing API defined by the W3C.
Apdex (user satisfaction)
Application Performance Index (Apdex) is an open standard that quantifies user satisfaction with application response time. Apdex classifies every sample into one of three categories based on a configurable threshold T:
| Category | Response time | Meaning |
|---|---|---|
| Satisfied | 0 to T | The application responds fast enough that the delay is imperceptible. |
| Tolerating | T to 4T | The response is noticeably slow, but the user can still complete the task. |
| Frustrated | Greater than 4T | The response is so slow that the user may abandon the task. |
Formula:
Apdex = (Satisfied count + Tolerating count / 2) / Total sample countIn ARMS, Apdex is calculated against First Paint Time (FPT), with a default threshold of T = 2 seconds.
JS stability
JS stability measures how often JavaScript errors affect page views (PVs).
If at least one JS error occurs during a PV cycle, that cycle counts as an error sample.
Formula:
JS error rate = Error sample count / Total sample countError samples include both automatically reported JS errors and errors reported through the SDK methods API.
Access speed
Access speed is measured by the First Paint Time (FPT) -- the time from when the browser initiates a request to when it begins parsing the first batch of HTML.
The following diagram shows how each timing metric maps to the page load process defined by the W3C Navigation Timing API:
Web page performance metrics
These metrics capture the overall page load experience.
| Reported field | Type | Description | Formula | Remarks |
|---|---|---|---|---|
| FMP | number (ms) | First Meaningful Paint. The point at which the primary content is visible. | N/A | N/A |
| FPT | number (ms) | First Paint Time. Time from request initiation to the browser parsing the first batch of HTML. | responseEnd - fetchStart | N/A |
| TTI | number (ms) | Time to Interactive. Time from request initiation until the browser finishes parsing HTML, constructs the DOM, and starts loading resources. | domInteractive - fetchStart | N/A |
| Ready | number (ms) | DOM ready time. Time to fully load and parse HTML into the DOM. | domContentLoadEventEnd - fetchStart | If synchronous JS executes on the page, its execution time = Ready - TTI. |
| Load | number (ms) | Full page load time. | loadEventStart - fetchStart | Load = FPT + DOM + (Ready - TTI) + Res. |
| FirstByte | number (ms) | Time to receive the first data packet from the server. | responseStart - domainLookupStart | N/A |
Phase-level timing breakdown
These metrics break down the page load into individual network and rendering phases to help pinpoint bottlenecks.
| Reported field | Type | Description | Formula | Remarks |
|---|---|---|---|---|
| DNS | number (ms) | Time spent on DNS lookup. | domainLookupEnd - domainLookupStart | N/A |
| TCP | number (ms) | Time spent establishing a TCP connection. | connectEnd - connectStart | N/A |
| TTFB | number (ms) | Time to First Byte (TTFB). Time the server takes to respond after receiving the request. | responseStart - requestStart | For details on how ARMS calculates TTFB, see Google's TTFB definition. |
| Trans | number (ms) | Time spent transferring the response body. | responseEnd - responseStart | N/A |
| DOM | number (ms) | Time spent parsing the DOM. | domInteractive - responseEnd | N/A |
| Res | number (ms) | Time spent loading synchronous resources on the page. | loadEventStart - domContentLoadedEventEnd | N/A |
| SSL | number (ms) | Time spent on the TLS/SSL handshake. | connectEnd - secureConnectionStart | Only applies to HTTPS connections. |
Mini program performance metrics
| Reported field | Type | Description | Formula | Remarks |
|---|---|---|---|---|
| FPT | number (ms) | First Paint Time. Time from the mini program's onLaunch call to the onShow call of the first page. | onShow (first page) - onLaunch (app) | N/A |
API call success rate
The API call success rate tracks how often API requests from your page complete successfully.
Formula:
API call success rate = Successful API call count / Total API call countSamples include both automatically reported AJAX requests and data reported through the SDK methods API.
Log fields
ARMS Browser Monitoring logs contain the following fields. Use these field names when building queries in Simple Log Service or setting up alert rules.
Common fields
These fields are present in all log types.
| Field | Type | Description |
|---|---|---|
| uid | string | User ID. A searchable identifier for the user. You can set a custom value. If not set, the SDK auto-generates an ID and rotates it every six months. |
| username | string | Username. The SDK does not auto-assign a username. If not set, this field is empty. |
| release | string | Application version ID. |
| environment | string | Production environment identifier. |
| page | string | The page URL. |
| sampling | number | Sampling rate. |
| tag | string | Custom tag for filtering and grouping. |
API call fields
| Field | Type | Description |
|---|---|---|
| api | string | The API request URL, without query parameters. |
| msg | string | The response string returned by the API call. |
| code | number | HTTP status code. |
| time | number (ms) | Time consumed by the API call. |
| success | boolean | Whether the API call succeeded. |
JS error fields
| Field | Type | Description |
|---|---|---|
| msg | string | Error message. |
| stack | string | Stack trace. |
| cate | string | Error type. Valid values: EvalError (related to eval()), RangeError (numeric value out of range), ReferenceError (invalid reference), SyntaxError (syntax error), TypeError (invalid variable or parameter type), URIError (invalid parameter passed to encodeURI() or decodeURI()), AggregateError (multiple errors from a single operation such as Promise.any()), or a custom error type. |
| file | string | File where the error occurred. |
| line | number | Line number of the error. |
| col | number | Column number of the error. |
| times | number | Number of occurrences of this error. |
Log types
ARMS Browser Monitoring generates the following log types. All log types share the common fields listed above.
| Log type | Type code | Queryable fields |
|---|---|---|
| PV log | PV | Uploaded on the onload event. PV = total PV log count. UV = PV logs deduplicated by uid. |
| Performance log | Perf | All performance metrics (FPT, TTI, Ready, Load, DNS, TCP, TTFB, and others). |
| Slow loading log | RES | Same as Performance log fields. Logged when page load time exceeds 8 seconds. |
| JS error log | Error | Error message, error file URL, error type. |
| API log | API | API name, response message, HTTP status code, response time, domain, success status, Trace ID. |
| SUM log | SUM | Custom key-value pair with an event name (for example, scroll-count). |
| AVG log | AVG | Custom key-value pair with an event name (for example, scroll-time). |
| Resource error log | ResourceError | Resource error details. |
| Custom log | Custom | User-defined fields for custom business monitoring. Custom logs are generated only when you call the ARMS Agent API to report data. Custom log data is not displayed in the ARMS console. Query and analyze custom logs in the Simple Log Service console. |