Azure Cloud Services に対して Profiler を有効にする

Application Insights Profiler を有効にして、Azure Cloud Services のインスタンスのパフォーマンス トレースを受信することができます。 Profiler は、Azure Diagnostics 拡張機能を介して Azure Cloud Services のインスタンスにインストールされます。

このガイドでは、以下の方法について説明します。

  • Azure Cloud Services のインスタンスで診断データを Application Insights に送信できるようにします。
  • Profiler をインストールするように、ソリューション内で Azure Diagnostics 拡張機能を構成します。
  • サービスをデプロイし、Profiler トレースを表示するためにトラフィックを生成します。

必須コンポーネント

Application Insights を使用して要求を追跡する

Azure Cloud Services のインスタンスを Azure portal に発行するときに、Azure Cloud Services に Application Insights SDK を追加します。

Application Insights に情報を送信するためのチェックボックスを示すスクリーンショット。

SDK を追加し、Azure portal に Azure Cloud Services のインスタンスを発行したら、Application Insights を使用して要求を追跡します。

Azure Diagnostics 拡張機能の構成

アプリケーション ロールで、Azure Diagnostics の diagnostics.wadcfgx ファイルを見つけます。

Azure Cloud Services ソリューション エクスプローラーの診断ファイルを示すスクリーンショット。

WadCfg の子要素として次の SinksConfig セクションを追加します。

<WadCfg>
  <DiagnosticMonitorConfiguration>...</DiagnosticMonitorConfiguration>
  <SinksConfig>
    <Sink name="MyApplicationInsightsProfiler">
      <!-- Replace with your own Application Insights instrumentation key. -->
      <ApplicationInsightsProfiler>00000000-0000-0000-0000-000000000000</ApplicationInsightsProfiler>
    </Sink>
  </SinksConfig>
</WadCfg>

Note

アプリケーションと ApplicationInsightsProfiler シンクで使用されるインストルメンテーション キーが一致する必要があります。

新しい診断構成を使用してサービスをデプロイします。 これで、Application Insights Profiler は Azure Cloud Services のインスタンスで実行されるように構成されました。

次のステップ

Note

インストルメンテーション キーのインジェストのサポートは、2025 年 3 月 31 日に終了します。 インストルメンテーション キーのインジェストは引き続き機能しますが、この機能の更新プログラムやサポートは提供されなくなります。 接続文字列に移行することで、新機能をご利用いただけます。