.NET Remotingの関連付けを有効化

開発者は .NET Remoting を使用して、複数のプロセスまたは同じプロセス内で実行中のアプリケーションドメインでオブジェクトを共有している分散アプリケーションを構築します。AppDynamicsはデフォルトで、.NET Remoting機能の相関を無効化しています。

Instrument Applications that Use .NET Remoting

You can configure the .NET Agent to discover .NET remoting entry and exit points.

  1. Open the config.xml Administer the .NET Agent
  2. Copy the code block below to a child element of the Machine Agent element. SeeFor example:.NET Agent Configuration Properties
    <instrumentation>
    <instrumentor name="RemotingMscorlibEntryInstrumentor" enabled="true"/>
    <instrumentor name="RemotingExitInstrumentor" enabled="true"/>
    </instrumentation>
    <?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 correlation for .NET remoting-->
    <instrumentation>
    <instrumentor name="RemotingMscorlibEntryInstrumentor" enabled="true"/>
    <instrumentor name="RemotingExitInstrumentor" enabled="true"/>
    </instrumentation>
    </machine-agent>
    ...
    </appdynamics-agent>
  3. Save the config.xml file.
  4. Restart the AppDynamics.Agent.Coordinator service.
  5. Restart instrumented applications for your changes to take effect.
If the agent does not discover the entry points after configuration, specify an agent trigger.

Specify an Agent Trigger

.NET remoting entry point functions execute in low-level .NET libraries that may not trigger automatic agent instrumentation. If the agent does not discover the .NET remoting entry points after configuration you can specify a function that triggers the agent to begin instrumentation.

  1. Identify a function to trigger the agent to begin instrumentation. The function can be any function that executes as part of the application process.For example, consider the following code for a MovieTicket GetTicketStatus
    using System;
    namespace MovieGoer
    {
    public class MovieTicket : MarshalByRefObject
    {
    public MovieTicket()
    {
    }
    public string GetTicketStatus(string stringToPrint)
    {
    return String.Format("Enquiry for {0} -- Sending back status: {1}", stringToPrint, "Ticket Confirmed");
    }
    }
    }
  2. Edit the config.xml Administer the .NET Agent.
  3. Update the Instrumentation element to include the AgentTriggerInstrumentor .NET Agent Configuration Properties.
    <instrumentation>
    <instrumentor name="AgentTriggerInstrumentor" enabled="true" args="" />
    <instrumentor name="RemotingMscorlibEntryInstrumentor" enabled="true"/>
    <instrumentor name="RemotingExitInstrumentor" enabled="true"/>
    </instrumentation>
  4. Set the AgentTriggerInstrumentor args args namespace.public_class.public_stringFor 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 correlation for .NET remoting-->
    <instrumentation>
    <instrumentor name="AgentTriggerInstrumentor" enabled="true" args="MovieGoer.MovieTicket.GetTicketStatus" />
    <instrumentor name="RemotingMscorlibEntryInstrumentor" enabled="true"/>
    <instrumentor name="RemotingExitInstrumentor" enabled="true"/>
    </instrumentation>
    </machine-agent>
    ...
    </appdynamics-agent>
  5. Save the config.xml file.
  6. Restart instrumented applications for your changes to take effect.