Troubleshoot iOS instrumentation

Follow these steps to fix instrumentation problems.

When you instrument an iOS application using the Splunk OpenTelemetry Instrumentation for iOS and you don’t see your data in Splunk Observability Cloud, follow these troubleshooting steps.

Steps for troubleshooting iOS OpenTelemetry issues

The following steps can help you troubleshoot iOS RUM library issues:

  1. Check compatibility and requirements

  2. Make sure you’re not using multiple tools

  3. Activate debug logging

Check compatibility and requirements

See Check compatibility and requirements for a complete list of compatible versions and requirements.

Make sure you’re not using multiple tools

Some development and observability tools include functionality similar to Splunk RUM. Using multiple tools for the same purpose, for example crash reporting, might result in undefined behavior. Use only one tool for each purpose.

Activate debug logging

Activating debug logging can help you to troubleshoot iOS instrumentation issues.

To activate logging, add the .enableDebugLogging(true) method to AgentConfiguration. For example:

import SplunkAgent
//..
  let agentConfig = AgentConfiguration(
            endpoint: endpointConfig,
            appName: "<App Name>",
            deploymentEnvironment: "<environment>"
        )
            .enableDebugLogging(true)
        do {
            _ = try SplunkRum.install(with: agentConfig)
        } catch {
            print("Unable to start the Splunk agent, error: \(error)")
        }
Note: Activate debug logging only when needed. Debug mode requires more resources.

iOS metrics don’t appear in Splunk RUM

If you can’t find telemetry for your iOS app in Splunk RUM, try the following:

  • Activate debug logging to search for simulator debug logs. See Activate debug logging.

  • Make sure that the values of rumAuth and realm are defined and correct.
    • The RUM token must be active and part of the org you are trying to send data to.

    • The realm must be the same as your organization’s realm.

To find your Splunk realm, see Note about realms.

If you’ve defined a custom beaconUrl, make sure the value is correct.

HTTP requests don’t appear in Splunk RUM

If HTTP requests don’t appear in Splunk RUM, try the following:

  • Check which library you’re using. Splunk RUM doesn’t support the deprecated Apple NSURLConnection API. Splunk RUM for iOS supports libraries based on Apple URLSession, which includes other libraries like AFNetworking and AlamoFire.

  • Use the ignoreUrls setting if you already have another telemetry library or SDK configured. See General settings.

  • Consider using Splunk RUM only for capturing network calls. More than one library or tool capturing network calls might cause issues and undefined behavior.

Crashes don’t appear in Splunk RUM

If crash information doesn’t appear in Splunk RUM, try the following:

  • Make sure that the crash reporting feature of Splunk RUM is the only active crash reporter. For example, if you’re also using Crashlytics, deactivate it and try again.

  • Make sure that you’re opening the application after a crash, so that the RUM library can send the report.

Avoid naming collisions

If your code causes a naming collision, add the module that contains the symbol you want to use. For example, if you declare a type that SplunkAgent also declares, you can add its module name as a prefix.

import SplunkAgent
//..
var a = SplunkAgent.MyConflictingType()

Xcode can’t find package SplunkAgent

Follow instructions in Migrate iOS applications. Make sure to follow the steps to clear caches as defined in the guide above.

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

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.