There are several ways to query your data . This document will show you some example NRQL queries from 모바일 모니터링 data. To see descriptions of the mobile-reported events and attributes available, see Mobile events .
Mobile, MobileSession, and MobileCrash event query examples Mobile queries allow you to understand and compare a wide variety of mobile data, including interactions, location, device profile, app version, crashes, and performance.
These examples use queries made on the Mobile
, MobileSession
, and MobileCrash
event types:
Interactions : Which interactions are most popular among my users?SELECT uniqueCount ( uuid ) FROM Mobile SINCE 1 day ago FACET name
Location : Which regions of China have the most users?SELECT uniqueCount ( uuid ) FROM MobileSession WHERE countryCode = 'CN' FACET regionCode SINCE 7 days ago
Device profile : How many users use the latest OS versions?SELECT uniqueCount ( uuid ) FROM MobileSession FACET osVersion SINCE 7 days ago
App version : Have we seen an increase in session duration since yesterday's release?SELECT percentile ( sessionDuration , 90 ) FROM MobileSession SINCE 1 day ago COMPARE WITH 2 days ago
Performance : How much memory does my app use for sessions longer than 5 seconds?SELECT histogram ( memUsageMb ) FROM MobileSession WHERE sessionDuration > 5
Crashes : What are my app's most common crashes?SELECT count ( * ) FROM MobileCrash FACET crashException
Crash rate : What is the crash rate for different versions of my app?SELECT percentage ( uniqueCount ( sessionId ) , WHERE category = 'Crash' ) AS ` Crash rate `
FROM MobileSession , MobileCrash FACET appVersion SINCE 90 days ago
MobileRequest event query examples This feature requires mobile monitoring agent version 5.14.0 or higher. MobileRequest
data is enabled by default for:
For earlier versions, starting with Android version 5.14.0 or iOS version 5.14.0, you must enable the feature. Upgrade to the latest Android or iOS version, or add the required feature flag to your app.
Below are some NRQL queries that address common use cases. Use the MobileRequest
attributes to make your own NRQL queries. The last two examples use MobileRequestError
events in addition to MobileRequest
to get an error rate.
Error rate by request domain Which domains are prone to failure and error?
SELECT percentage ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' )
count ( * ) AS '# of Requests' ,
filter ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' AS '# of Errors' )
FROM MobileRequestError , MobileRequest FACET requestDomain
Error rate for business-critical API What is the error rate seen by our mobile apps for the most business-critical API?
SELECT percentage ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' )
count ( * ) AS '# of Requests' ,
filter ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' AS '# of Errors' )
FROM MobileRequestError , MobileRequest FACET requestPath WHERE requestPath = 'MY_API_PATH'
Response time percentiles of important APIs For important requests in the 90th percentile, what is the response time by URL?
SELECT percentile ( responseTime , 90 ) , latest ( requestUrl ) AS 'Latest URL' FROM MobileRequest
FACET cases ( WHERE requestUrl LIKE '%YOUR_CORE_API%' AS 'Core API' ,
WHERE requestUrl LIKE '%YOUR_FEATURE_API%' AS 'New Feature API' )
Volume of network requests How much network traffic from the apps are backend services receiving?
SELECT count ( * ) FROM MobileRequest FACET requestDomain SINCE 3 days ago
Slow response user impact What % of users are impacted by http response times greater than 3 seconds?
SELECT filter ( uniqueCount ( MobileRequest . uuid ) , WHERE responseTime > 3 )
/ uniqueCount ( MobileSession . uuid ) * 100 AS '% Users Impacted'
FROM MobileRequest , MobileSession SINCE 1 day ago TIMESERIES COMPARE WITH 2 days ago
Response time distribution by domain, carrier, ASN owner, country, etc. What is the distribution of response time and request count across domain, country, carrier, or ASN owner?
SELECT histogram ( responseTime , 20 , 20 ) FROM MobileRequest SINCE 3 days ago FACET asnOwner
Percentile response time What is the breakdown of response time by different percentiles?
SELECT percentile ( responseTime , 98 ) AS '98 percentile (sec)' ,
percentile ( responseTime , 90 ) AS '90 percentile (sec)' ,
percentile ( responseTime , 50 ) AS '50 percentile (sec)'
FROM MobileRequest SINCE 3 days ago
Requests per session How do requests per session compare across different apps or subsequent builds of those apps?
SELECT count ( * ) / uniqueCount ( sessionId ) FROM MobileRequest , MobileSession FACET appName TIMESERIES
MobileRequestError event query examples Below are some NRQL queries that address common use cases. Use the MobileRequestError
attributes to make your own NRQL queries.
HTTP errors Which queries are causing the most errors?
SELECT count ( * ) FROM MobileRequestError WHERE errorType = 'HTTPError' FACET requestUrl
Network failures What network failures are most common for my application?
SELECT count ( * ) FROM MobileRequestError WHERE errorType = 'NetworkFailure' FACET networkError
Error rate by request domain Which domains are prone to failure and error?
SELECT percentage ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' )
count ( * ) AS '# of Requests' ,
filter ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' AS '# of Errors' )
FROM MobileRequestError , MobileRequest FACET requestDomain
Error rate for business-critical API What is the error rate in our mobile apps for the most business-critical API?
SELECT percentage ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' )
count ( * ) AS '# of Requests' ,
filter ( count ( * ) , WHERE errorType = 'NetworkFailure' OR errorType = 'HTTPError' AS '# of Errors' )
FROM MobileRequestError , MobileRequest FACET requestPath WHERE requestPath = 'MY_API_PATH'
Error rate: Percentage of users impacted How many users are experiencing errors as compared to my total user count?
SELECT filter ( uniqueCount ( MobileRequestError . uuid ) , WHERE errorType = 'HTTPError' )
/ uniqueCount ( MobileSession . uuid ) * 100 AS '% Users Impacted by Errors'
FROM MobileRequestError , MobileSession COMPARE WITH 7 days AGO
Errors by version Which version(s) of my app are causing the most errors?
SELECT count ( * ) FROM MobileRequestError FACET appVersion
Unique devices (by UUID) Which unique devices (by UUID) are having the most issues with my application?
SELECT count ( * ) , latest ( device ) , latest ( carrier ) , latest ( asnOwner ) , latest ( countryCode )
FROM MobileRequestError FACET deviceUuid LIMIT 100 SINCE 1 days ago
Historical HTTP error counts What does my historical HTTP Error count look like (by domain)?
SELECT count ( * ) FROM MobileRequestError WHERE errorType = 'HTTPError' FACET requestDomain TIMESERIES
MobileHandledException event query examples Below are some NRQL queries for common handled exception use cases. Use the MobileHandledException
attributes to make your own NRQL queries.
App exceptions Which apps have reported the most number of handled exceptions?
SELECT count ( * ) FROM MobileHandledException FACET appName SINCE 3 days ago
Top exception locations What are most common exception locations for my application? How many exceptions do we have, and where do they occur?
SELECT count ( * ) FROM MobileHandledException FACET exceptionLocation SINCE 3 days ago
Most common interaction generating exceptions Which interaction produces the most exceptions?
SELECT count ( * ) FROM MobileHandledException FACET lastInteraction SINCE 3 days ago
Most common exception message What are the most common reported exception messages?
SELECT count ( * ) FROM MobileHandledException FACET exceptionMessage SINCE 3 days ago
Most common method reporting exceptions What are the most common methods reporting exceptions?
SELECT count ( * ) FROM MobileHandledException FACET exceptionLocationMethod SINCE 3 days ago
Handled exception rate How often are handled exceptions encountered by our users?
SELECT percentage ( uniqueCount ( sessionId ) , WHERE exceptionLocation IS NOT NULL )
FROM MobileSession , MobileHandledException SINCE 3 days ago