Troubleshoot Android instrumentation
Follow these steps to fix instrumentation problems.
When you instrument an Android application using the Splunk OpenTelemetry Instrumentation for Android and you don’t see your data in Splunk Observability Cloud, follow these troubleshooting steps.
Steps for troubleshooting Android OpenTelemetry issues
The following steps can help you troubleshoot Android RUM agent issues:
Check that desugaring is activated for your app
If you see runtime errors related to Java 8 interfaces and classes, make sure you have activated coreLibraryDesugaring
. See Activate desugaring in your application.
Activate debug logging
Activating debug logging can help you troubleshoot Android instrumentation issues.
To activate logging, set the enableDebugLogging
to true in to AgentConfiguration
. For example:. For example:
Kotlin
val agent = SplunkRum.install(
application = this,
agentConfiguration = AgentConfiguration(
endpoint = EndpointConfiguration(
realm = "your-splunk-realm",
rumAccessToken = "your-splunk-access-token"
),
enableDebugLogging = true
)
)
SplunkRum agent = SplunkRum.install(
this,
new AgentConfiguration(
new EndpointConfiguration(
"your-splunk-realm",
"your-splunk-access-token"
),
"Android demo app", // Application name
"dev", // Deployment environment
"1.0.0", // Application version
true // Enable debug logging
)
);
Background tasks are introducing noise in the data
Background tasks might introduce unwanted or noisy data to your instrumented application. To deactivate instrumentation for a background task, set the boolean deferredUntilForeground
in AgentConfiguration as shown below:
- Kotlin
class AppTest: Application() { override fun onCreate() { super.onCreate() val agentConfiguration = AgentConfiguration( endpoint = EndpointConfiguration( realm = "your-splunk-realm", rumAccessToken = "your-splunk-access-token" ), appName = "your-application-name", appVersion = "your-application-version", deploymentEnvironment = "your-deployment-environment", deferredUntilForeground = true, ) val splunkRum = SplunkRum.install(this, agentConfiguration) } }
- Java
public class SampleApplication extends Application { @Override public void onCreate() { super.onCreate(); private static final String SPLUNK_REALM = "<realm>"; private static final String SPLUNK_RUM_ACCESS_TOKEN = "<rum-access-token>"; AgentConfiguration agentConfiguration = new AgentConfiguration( new EndpointConfiguration( SPLUNK_REALM, SPLUNK_RUM_ACCESS_TOKEN ), appName = "<APP_NAME>", appVersion = "<APP_VERSION>", deploymentEnvironment = "<DEPLOYMENT_ENVIRONMENT>", deferredUntilForeground = true, ); SplunkRum.install(this, agentConfiguration); } }
If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.
Available to Splunk Observability Cloud customers
-
Submit a case in the Splunk Support Portal.
-
Contact Splunk Support.
Available to prospective customers and free trial users
-
Ask a question and get answers through community support at Splunk Answers.
-
Join the Splunk #observability user group Slack channel to communicate with customers, partners, and Splunk employees worldwide. To join, see Chat groups.