.NETのスレッドの関連付け

デフォルトでは、.NET エージェントは、共通言語ランタイム(CLR)4.x 以降で次のパターンのマルチスレッド相関に対応します。

  • Task.Start
  • Task.Run
  • TaskFactory.StartNew

.NET エージェントは、デフォルトで無効になっている次のパターンのスレッドの相関に対応します。

  • Thread.Start (CLR 2.x および CLR 4.x)
  • ThreadPool.QueueUserWorkItem (CLR 2.x および CLR 4.x)

4.3 より前のバージョンの Splunk AppDynamics では、.NET エージェントの場合、config.xml ファイル内の CLR 4 の ThreadPool.QueueUserWorkItem に相関を設定する必要はありませんでした。CLR 4 の ThreadPool.QueueUserWorkItem を明示的に呼び出す場合は、以前のバージョンから .NET エージェント 4.5 にアップグレードするときに、config.xml ファイルの CLR 4 の ThreadPool.QueueUserWorkItem に対して instrumentor を有効にする必要があります。

Configure Thread Correlation for .NET

Configure all instrumentation settings for the .NET Agent in the config.xml. See Administer the .NET Agent

  1. Open the config.xml file for editing as an administrator. SeeAdminister the .NET Agent.
  2. Copy the code block below to a child element of the Machine Agent element. See Machine Agent Element.
    <instrumentation>
                        <instrumentor name="ThreadCorrelationThreadPoolCLR2Instrumentor" enabled="true"/>
                        <instrumentor name="ThreadCorrelationThreadPoolCLR4Instrumentor" enabled="true"/>
                        <instrumentor name="ThreadStartCLR2Instrumentor" enabled="true"/>
                        <instrumentor name="ThreadStartCLR4Instrumentor" enabled="true"/>
                        </instrumentation>
    For example:
    <?xml version="1.0" encoding="utf-8"?>
                            <appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                            ...
                            <machine-agent>
                            <!--Enable thread correlation-->
                            <instrumentation>
                            <instrumentor name="ThreadCorrelationThreadPoolCLR2Instrumentor" enabled="true"/>
                            <instrumentor name="ThreadCorrelationThreadPoolCLR4Instrumentor" enabled="true"/>
                            <instrumentor name="ThreadStartCLR2Instrumentor" enabled="true"/>
                            <instrumentor name="ThreadStartCLR4Instrumentor" enabled="true"/>
                            </instrumentation>
                            </machine-agent>
                            ...
                            </appdynamics-agent>
    The configuration syntax is enabled="true".
  3. Save the config.xml file.
  4. Restart the AppDynamics.Agent.Coordinator service.
  5. Restart instrumented applications for your changes to take effect.