Docs » Splunk Observability Cloud でサポートされているインテグレーション » モバイルおよび Web アプリケーションを Splunk RUM でインストルメンテーションする » Splunk RUM に iOS アプリケーションをインストルメンテーションする » Splunk iOS RUM インストルメンテーションを設定する

Splunk iOS RUM インストルメンテーションを設定する 🔗

Splunk OpenTelemetry Instrumentation for iOS の iOS RUM ライブラリを設定することで、カスタム属性の追加、環境やアプリケーションに合わせたインストルメンテーション、サンプリングのカスタマイズなどを行うことができます。

iOS RUM ライブラリを設定するには、SplunkRum モジュールを初期化する際にメソッドとして設定を渡します。Splunk Observability Cloud レルムと RUM トークンは、SplunkRumBuilder 関数の引数として渡されます。

次の例は、RUMトークン、レルム、環境名、アプリ名、およびその他の設定を構成する方法を示しています:

import SplunkOtel
//..
SplunkRumBuilder(realm: "<realm>", rumAuth: "<rum-token>")
  // Call functions to configure additional options
  .debug(enabled: true)
  .globalAttributes(globalAttributes: ["strKey": "strVal", "intKey": 7, "doubleKey": 1.5, "boolKey": true])
  .deploymentEnvironment(environment: "env")
  .setApplicationName("<your_app_name>")
  .ignoreURLs(ignoreURLs: try! NSRegularExpression(pattern: ".*ignore_this.*"))
  .screenNameSpans(enabled: true)
  // The build method always come last
  .build()

一般設定 🔗

iOS RUMライブラリを構成するには、以下の設定を使用します:

オプション

説明

realm

組織のレルムの名前、例えば us0。Splunk レルムを検索するには、レルムに関する注意 を参照してください。

rumAuth

エージェントがテレメトリデータを Splunk Observability Cloud に送信することを許可する RUM トークン。RUM アクセストークンを生成するには、Generate your RUM access token in Splunk Observability Cloud を参照してください。

beaconUrl

エージェントが収集したテレメトリを送信するインジェスト URL。URL には Splunk Observability Cloud のレルムを含める必要があります。たとえば、https://rum-ingest.us0.signalfx.com/v1/rumus0 レルムのインジェスト URL です。定義すると、realm の値を上書きします。

globalAttributes

すべてのスパンに追加される属性を設定します。属性は、カンマで区切られたキーと値のペアの配列として定義されます。例: ["key1":"value1","key2":3]グローバル属性の管理 を参照してください。

environment

アプリケーションによって生成されるすべてのスパンの環境。例えば、devtest 、または prod

appName

アプリケーション名を設定します。設定しない場合、ライブラリは代わりにバンドル名を使用します。デフォルト値は nil です。

iOS RUMの特徴 🔗

iOS RUMインストルメンテーションの動作を設定するには、以下の設定を使用します:

オプション

説明

ignoreURLs

HTTPアクティビティを報告する際に無視したいURLにマッチする正規表現パターン。

spanFilter

スパンを修正または無視するための ((SpanData) -> SpanData?)? 型のクロージャ。スパンをフィルターする を参照してください。

sessionSamplingRatio

サンプリングするセッションの割合。0.0 から 1.0 の範囲の割合で表されます。デフォルト値は 1.0 です。

allowInsecureBeacon

If set to true, this setting allows beacon URLs that use the HTTP protocol. The default value is false. allowInsecureBeacon is deprecated in Splunk RUM as of February 4, 2025. Although this setting continues to function, it will be removed in a future version.

enableDiskCache

Activates caching of exported spans. All spans are written to local storage and deleted after a successful export. The default value is false. This setting is deprecated in Splunk RUM as of February 4, 2025. Although this setting continues to function, it will be removed in a future version. There is no replacement for this annotation.

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. This setting is deprecated in Splunk RUM as of February 4, 2025. Although this setting continues to function, it will be removed in a future version. There is no replacement for this annotation.

bspScheduleDelay

Sets the maximum interval between two consecutive span exports. The default value is 5 seconds. This setting is deprecated in Splunk RUM as of February 4, 2025. Although this setting continues to function, it will be removed in a future version. There is no replacement for this annotation.

slowRenderingDetectionEnabled

低速レンダリング検出機能を有効にします。デフォルト値は true です。低速レンダリング検出 を参照してください。

slowFrameDetectionThresholdMs

ミリ秒単位で指定された時間以上かかったすべてのフレームを遅いとしてタグ付けするオプション設定。デフォルト値は 16.7 ミリ秒です。

frozenFrameDetectionThresholdMs

ミリ秒単位で指定された時間以上かかったすべてのフレームを凍結としてタグ付けするオプション設定。デフォルト値は 700 ミリ秒です。

debug

デバッグロギングを有効にします。デフォルト値は false です。

インストルメンテーション設定 🔗

以下の設定を使用して、特定のデータの収集を有効または無効にします:

オプション

説明

showVCInstrumentation

ViewController Show イベント用のスパンの作成を有効にします。デフォルト値は true です。

screenNameSpans

スクリーン名の変更に対するスパンの作成を有効にします。デフォルト値は true です。

networkInstrumentation

ネットワークアクティビティ用のスパンの作成を有効にします。デフォルト値は true です。

このページは 2025年02月04日 に最終更新されました。