Android RUM - Setup & Installation Docs | Middleware
Android SDK Version 21
or above. Check your Android SDK version with the following command:
Method | Description |
---|---|
setRumAccessToken(String) | Authorizes client to send telemetry to Middleware |
setTarget(String) | Sets target URL to recieve telemetry |
setService(String) | Sets service name of your application |
setDeploymentEnvironment(String) | Sets environment attribute on spans generated by instrumentation. Example: PROD , DEV |
disableCrashReporting() | Disables crash reporting which is enabled by default |
disableAnrDetection() | Disables Application Not Responding (ANR) detection which is enabled by default |
disableNetworkMonitor() | Disables network change detection which is enabled by default |
disableSlowRenderingDetection() | Disables slow or frozen frame render detection which is enabled by default |
setSlowRenderingDetectionPollInterval(Duration) | Sets default polling for slow or frozen render detection. Default detection interval is 1000 milliseconds |
addEvent
startWorkflow
end
addException(Throwable)
to report exceptions, errors, and display messages on the Middleware dashboard
onResume
and onPause
methods.
Android Version 8.0 (Android Oreo)
or higher Name | Type | Description |
---|---|---|
project.name , app | String | Defines the project name, used as projectName(String) |
service.name | String | Defines the service name, used as serviceName(String) |
session.id | String | Random session identifier generated by Middleware SDK |
rum.sdk.version | String | Middleware SDK version |
Name | Type | Description |
---|---|---|
deployment.environment | String | Name of deployment environment. Example: DEV , PROD |
device.model.identifier | String | Device model identifier. Example: Moto-G30 |
device.model.name | String | Name of device. Example: ONEPLUS A600 |
device.manufacturer | String | Name of device manufacturer. Example: OnePlus |
os.name | String | Name of operating system. Sets to Android |
os.description | String | Operating System description. Example: Android Version 11 (Build RKQ1.201217.002 API level 30) |
os.type | String | Operating System type. Sets to Linux |
os.version | String | Operating System version. Example: Android version 11 |
Crash Reporting
Name | Type | Description |
---|---|---|
thread.id | Integer | ID of the current managed thread, as opposed to the operating system thread ID |
thread.name | String | Name of the thread |
exception.message | String | Message of the exception |
exception.type | String | Type of exception |
exception.stacktrace | String | Stack trace for the exception |
exception.escaped | String | Sets true , denoting the uncaught exception, such as a crash occurring |
component | String | Sets crash |
event.type | String | Sets error |
Network Monitoring
network.change
and the following attributes:Name | Type | Description |
---|---|---|
network.status | String | Network status set to lost or available |
network.connection.type | String | Connection type set to wifi , cell , unavailable , or unknown |
network.carrier.name | String | Name of network carrier used |
Application Not Responding (ANR)
Name | Type | Description |
---|---|---|
exception.stacktrace | String | Stack trace for the exception |
component | String | Sets error |
event.type | String | Sets error |
Slow Rendering Detection
slowRenders
for tallying slow frames, and another named frozenRenders
for tallying frozen frames. Slow Render Detection is enabled by default.Spans generated by Slow Rendering Detection include the following attribute:Name | Type | Description |
---|---|---|
count | Integer | Number of slow or frozen frames on a 1 second interval. Change the interval duration by passing a positive integer (in milliseconds) to the slowRenderingDetectionPollInterval(Duration) setting |
HTTP Client Attributes
Name | Type | Description |
---|---|---|
http.method | String | GET , POST , HEAD |
http.url | String | https://foo.bar/address?q=value#hash |
http.flavor | String | 1.0 |
http.status_code | Integer | 200 , 404 , 418 |
http.response_content_length | Integer | 3495 (bytes) |
http.user_agent | String | CERN-LineMode/2.15 libwww/2.17b3 |
net.transport | String | IP.TCP |
net.peer.name | String | example.com |
net.peer.port | Integer | 80 , 8080 , 443 |
component | String | Sets http |
Activity Lifecycle Monitoring
Name | Type | Description |
---|---|---|
component | String | Sets ui |
activityName , activity.name | String | Name of the activity class. Example: MainActivity |
Fragment Lifecycle Monitoring
Created
: Activity starts for the first time.
Restarted
:Activity restarts after being stopped.
Resumed
: Activity resumes after a pause.
Paused
: Activity is paused.
Stopped
: Activity stops.
Destroyed
: Activity is destroyed.
Name | Type | Description |
---|---|---|
component | String | Sets ui |
fragmentName | String | Name of the fragment class Example: MainFragment |
App Start Monitoring
Cold Starts
: Occurs when users open the app for the first time after booting their phone or terminating the app.
Warm Starts
: Occurs when some operations from a cold start are still in progress. Warm starts are quicker than cold starts but slower than hot starts.
Hot Starts
: Occurs when the system brings an app to the foreground. They are faster than cold starts as the app is already loaded.
Name | Type | Description |
---|---|---|
component | String | Sets appstart |
start.type | String | Type of start. Value cold , warm , or hot |