Relic Solution: MobileRequestError Events Tips and Tricks

MobileRequestError for Insights query examples

Here are a few queries you can uses with MobileRequestError for Insights to get started diving into event data on request failures. Hopefully these examples will get your creative juices flowing!

Do I need to update the agent?

Yes and no. Right now Mobile Enterprise customers can view the MobileRequestError event type in Insights. However, updating to agent version 5.11.0 or newer will give you additional attribute information. Check out our MobileRequestError doc page for more details.

Now let’s write some NRQL queries!

Error-Free Users

What percentage of users have been error free for the last hour and how does that compare to yesterday?

HTTP Errors: Error-Free Users

SELECT (1-filter(uniqueCount(MobileRequestError.uuid), 
WHERE errorType='HTTPError') / uniqueCount(Mobile.uuid)) * 100 AS '% Error-Free Users' 
FROM MobileRequestError, Mobile compare with 1 day ago

Network Failures: Failure-Free Users

SELECT (1-filter(uniqueCount(MobileRequestError.uuid), 
WHERE errorType='NetworkFailure' and networkError not like 'Cancelled') / uniqueCount(Mobile.uuid)) * 100 AS '% Failure-Free Users' 
FROM MobileRequestError, Mobile  compare with 1 day ago

Errors by Apps

Which one of your apps has the most errors? What about different versions of a specific app?

HTTP Errors: Apps

SELECT count(*) FROM MobileRequestError 
WHERE errorType='HTTPError' 
FACET appName

HTTP Errors: App Versions

SELECT count(*) FROM MobileRequestError 
WHERE errorType='HTTPError' 
AND appName = 'YOUR_APP_NAME_HERE' 
FACET appVersion

Note: Don’t forget to add the name of your app to this query.

HTTP Errors: App Builds

SELECT count(*) FROM MobileRequestError 
WHERE errorType='HTTPError' 
AND appName = 'YOUR_APP_NAME_HERE' 
FACET appBuild

Note: Don’t forget to add the name of your app to this query.

Errors by Domains and Paths

Which domains and paths are getting the most HTTP errors?

HTTP Errors: Domains

SELECT count(*) FROM MobileRequestError 
WHERE errorType='HTTPError' 
FACET requestDomain

HTTP Errors: Paths

SELECT count(*) FROM MobileRequestError 
WHERE errorType='HTTPError' 
FACET requestPath

Failing Endpoints

SELECT count(*) FROM MobileRequestError 
FACET requestUrl TIMESERIES

HTTP Errors by Status Code

Let’s chart HTTP errors by their status code.

HTTP Request Errors (Status Code)

SELECT count(*) FROM MobileRequestError 
FACET statusCode TIMESERIES

Network Errors (Type) as a chart

SELECT count(*) FROM MobileRequestError 
FACET networkError TIMESERIES

Network Errors (Type) as a table

SELECT count(*) FROM MobileRequestError 
FACET networkError

Which ISPs are the most problematic?

Do you want to see which providers are contributing to the most errors for your users?

Worst Wifi Providers

SELECT count(*) FROM MobileRequestError 
WHERE carrier = 'wifi'
FACET asnOwner

Bad Providers (Excluding Wifi)

SELECT count(*) FROM MobileRequestError 
WHERE carrier != 'wifi' 
FACET asnOwner

See ErrorRequest count grouped by service/segment name

Let’s say you want to see a count of errors grouped by a specific service or segment name. We can do this with the Insights FACET CASES clause.

Each Cases category will show ErrorRequests which contain specific segment terms like /token/.

Query example:

SELECT count(*), latest(requestUrl) AS 'Latest URL' FROM MobileRequestError 
WHERE errorType like 'HTTPError' 
FACET CASES(WHERE requestUrl LIKE '%token%' AS 'Tokens', 
WHERE requestUrl LIKE '%summary%' AS 'Summary', 
WHERE requestUrl LIKE '%dashboards%' AS 'Dashboards', 
WHERE requestUrl LIKE '%collections%' AS 'Collections', 
WHERE requestUrl NOT LIKE '%token%' 
AND requestUrl NOT LIKE '%summary%' 
AND requestUrl NOT LIKE '%dashboards%' 
AND requestUrl NOT LIKE '%collections%' AS 'Other' )

Example screenshot of the above query:

2 Likes