Docs » Instrument mobile and web applications for Splunk RUM » Instrument iOS applications for Splunk RUM » Configure the Splunk iOS RUM instrumentation

Configure the Splunk iOS RUM instrumentation 🔗

You can configure the iOS RUM agent from the Splunk OpenTelemetry Instrumentation for iOS to add custom attributes, adapt the instrumentation to your environment and application, customize sampling, and more.

To configure the iOS RUM agent, pass the settings as arguments when initializating the SplunkRum module. The following example shows how to configure the RUM token, beacon URL, and environment name:

import SplunkOtel
//..
SplunkRum.initialize(beaconUrl: "https://rum-ingest.<realm>.signalfx.com/v1/rum",
      rumAuth: "<rum-token>",
      options: SplunkRumOptions(environment:"<environment-name>"))

General settings 🔗

Use the following settings to configure the iOS RUM agent:

Option

Description

beaconUrl

Ingest URL to which the agent sends collected telemetry. The URL must contain your realm in Splunk Observability Cloud. For example, https://rum-ingest.us0.signalfx.com/v1/rum is the ingest URL for the us0 realm.

rumAuth

RUM token that authorizes the agent to send telemetry data to Splunk Observability Cloud. To generate a RUM access token, see Generate your RUM access token in Observability Cloud.

globalAttributes

Sets additional attributes added to all spans. Attributes are defined as an array of comma-separated key-value pairs. For example: ["key1":"value1","key2":3]. See Manage global attributes.

environment

Environment for all the spans produced by the application. For example, dev, test, or prod.

ignoreURLs

Regular expression pattern that matches URLs you want to ignore when reporting HTTP activity.

spanFilter

Closure of type ((SpanData) -> SpanData?)? to modify or ignore spans. See Filter spans.

sessionSamplingRatio

Percentage of sessions to sample. Expressed as a proportion in the range 0.0 to 1.0. The default value is 1.0.

allowInsecureBeacon

If set to true, this setting allows beacon URLs that use the HTTP protocol. The default value is false.

enableDiskCache

Activates caching of exported spans. All spans are written to local storage and deleted after a successful export. The default value is false.

spanDiskCacheMaxSize

Threshold, in megabytes, from which spans start to be dropped from the disk cache. The oldest spans are dropped first. Only applicable when disk caching is activated. The default value is 25 megabytes.

slowRenderingDetectionEnabled

Activates the slow rendering detection feature. The default value is false. See Slow rendering detection.

slowFrameDetectionThresholdMs

Optional setting that tags as slow all frames that took more than the specified time, in milliseconds. The default value is 16.7 milliseconds.

frozenFrameDetectionThresholdMs

Optional setting that tags as frozen all frames that took more than the specified time, in milliseconds. The default value is 700 milliseconds.

debug

Activates debug logging. The default value is false.

Instrumentation settings 🔗

Use the following settings to activate or deactivate the collection of specific data:

Option

Description

showVCInstrumentation

Activates the creation of spans for ViewController Show events. The default value is true.

screenNameSpans

Activates the creation of spans for changes to the screen name.

networkInstrumentation

Activates the creation of spans for network activities.