Configuration settings

The auto-instrumentation process instruments your iOS apps for monitoring with OneAgent. The instrumentation process is an automated way of adding OneAgent to an app without manually modifying its source code. An auto-instrumented app is equivalent to an app that is manually instrumented for basic data collection. This level of instrumentation provides visibility into the real user experience delivered by your app. It also enables crash detection and performance monitoring related to app start-up and web request response times.

Auto-instrumentation features

The following features are automatically instrumented:

  • Automatic OneAgent startup
  • Lifecycle data
  • Crash reporting
  • Web request tagging
  • Web request events execution time and the data sent are reported, 3rd-party requests are identified
  • Web views
  • Automatic user action detection (detection and timing of user actions, such as button clicks, view actions, and other controls)

All these features are enabled by default. You can disable or refine auto-instrumentation functions by adding configuration keys to your app’s Info.plist file.

Auto-instrumentation occurs during runtime. The resulting app is instrumented to the levels configured in the app's Info.plist file.

You can combine manual instrumentation with auto-instrumentation to capture additional details. For example, you may want to manually instrument certain user-defined actions, report values, and events.

Configuration keys

Configuration keys are essentially properties you can set to your preferences for auto-instrumentation. Add the keys to your app's Info.plist file, as required to fine-tune auto-instrumentation.

To keep your Info.plist file clean, move all OneAgent-related DTX keys to a DESK.plist file and add the DESK.plist to the Copy Bundle Resources build phase. The DESK.plist file must be at the root of your resources bundle, so it should be created in the same location as the Info.plist file.

The following table includes all configuration keys for iOS auto-instrumentation.

Security and authentication

You can use the Public Key Hash Pinning feature for authentication purposes.

Caution

Public key pinning can be dangerous. If you make a mistake, you might cause your app to pin a set of keys that validates today but which stops validating a week or a year from now. In that case, your app will no longer be able to connect to the server and will most likely stop working until it gets updated with a new set of keys.

How to use PKH pinning with DESK

Step 1

Generate the hashes from your certificates. From your agent kit run the getPKHashFromCertificate.py script to generate a hash from your certificate:

python getPKHashFromCertificate.py <path to your cert>.<der|pem> --type <DER | PEM>

The output should look like this:

CERTIFICATE INFO
----------------
subject= *****
issuer= *****
SHA1 Fingerprint= ******

---------------------- DTXDomainPins item ----------------------
DTXPKHash: SomePublicKeyHash=
DTXPKHashAlgoritm: DTXAlgorithmRsa2048

Step 2

Use the output from the script in your info.plist as a dictionary under the key DTXPublicKeyPins as explained above.

Limitations

  • An auto-instrumented application can't carry out functions such as DESK.shutdown() or DESK .flushEvents(). You can manually insert these methods and other user-defined actions and events before performing auto-instrumentation.
  • The following controls can't be used to create auto user actions:
    • Gestures
    • Certain UIBarButton items, including custom UIBarButton items added to the navigation bar by a storyboard (such as info) that use segues to transition to other views.