アプリケーションのリソース属性の設定

OpenTelemetry™ コレクタをデプロイして設定した後は、リソース属性Splunk AppDynamics でモニターされるアプリケーションと階層の名前に設定し、telemetry.sdk.language 属性がアプリケーションの言語に設定されていることを確認する必要があります。これにより、Splunk AppDynamicsOpenTelemetry サービスがアプリケーションから にマッピングされます。

はじめる前に

以下のセクションで属性を構成する前に、OpenTelemetry™ Collector をデプロイして構成したことを確認してください。

service.name と service.namespace をアプリケーション名と階層名に設定します。

注: OpenTelemetry トレーサ/SDK でアプリケーションをモニターする場合、service.nameservice.namespace がコントローラ UI の階層とアプリケーションの名前にマッピングされるように設定されていることを確認してください。「Attributes with Special Handling」を参照してください。

service.name および service.namespace リソース属性を設定する場合、3 つのオプションがあります。

  • (推奨オプション)アプリケーションコード内に service.name および service.namespace を設定します。
    • Splunk AppDynamics で Node.js アプリケーションをモニターする場合、OpenTelemetry の ApplicationName および TierName は、Node.js require ステートメントの ApplicationNameTierName から派生します。
    • Splunk AppDynamics で Java アプリケーションをモニターする場合、JVM の階層名(service.name 内)とアプリケーション名(service.namespace 内)を設定します。
      CODE
      -Dotel.resource.attributes="service.name=Shop,service.namespace=Shopping"
  • OpenTelemetry otel-config.yml ファイル(「Collector 設定の例」を参照)で、service.nameSplunk AppDynamics でモニターされる階層名に設定します。
    CODE
    service.name: shopping cart
  • OTEL_RESOURCE_ATTRIBUTES 環境変数service.nameservice.namespace を設定します。言語固有の手順については、「OpenTelemetry Instrumentation」を参照してください。

Set telemetry.sdk.language to Your Application Language

Most language SDKs populate the attribute telemetry.sdk.language automatically. If this attribute is not set, the Controller may not able to determine the language of your application. To set this language attribute, see OpenTelemetry Telemetry SDK.