Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The callee-side Web service infrastructure (Web service server-side) is implemented in ASP.NET. In other words, tracking Web services in the called-side is covered by tracking Service Requests.
See “About About the instrumentation file” on page 151file.

The Microsoft .NET framework contains comprehensive support for Web service clients (caller-side). For example, Visual Studio.NET generates a proxy class code that wraps the calls to the underlying Web service (the generated class extends an appropriate base class, such as System.Web.Services.Protocols.SoapHttpClientProtocol).

Web services are tracked by default. The ability to track Web service calls for all instances relies on the following blocks, which are part of the default instrumentation file:

<dll name="System.Web.Services.dll" >
     <instrument>
          <classes>
               <class>
                    <name>System.Web.Services.Protocols. SoapHttpClientProtocol</name>
                    <called-method>
                    <methods>
                         <method type="WS">
                              <name>Invoke</name>
                         </method>
                         <method type="WS">
                              <name>BeginInvoke</name>
                         </method>
                         <method type="WS">
                              <name>EndInvoke</name>
                         </method>
                    </methods>
                    </called-method>
               </class>

...

               <class>
                    <name>System.Web.Services.Protocols. HttpSimpleClientProtocol</name>
                    <called-method>
                    <methods>
                         <method type="WS">
                              <name>Invoke</name>
                         </method>
                         <method type="WS">
                              <name>BeginInvoke</name>
                         </method>
                         <method type="WS">
                              <name>EndInvoke</name>
                        </method>
                   </methods>
               </called-method>
               </class>
          </classes>
     </instrument>
</dll>

About tracking the message queue API

To have Precise for Microsoft .NET track the usage of the Microsoft Message Queue API, you need to instrument the System.Messaging.dll file by manually adding the following blocks to the instrumentation block of the specific instance in the Instrumentation.xml file. Usually, it is sufficient to only instrument and track the methods Send and Receive to ensure that all appropriate Microsoft Message Queue call are tracked.NOTE    The

Info

The default instrumentation file for Precise for Microsoft .NET does not contain these blocks. To track Microsoft Message Queue calls, you must add these blocks manually.

To instrument Message Queue calls, insert the following section under instrumentation rules for the monitored instance in the instrumentation file:

<dll name="System.Messaging.dll">
     <instrument>
          <classes>
               <class>
                    <name>System.Messaging.MessageQueue</name>
                         <called-method>
                              <methods>
                                   <method>
                                        <name>Send</name>
                                   </method>
                                   <method>
                                        <name>Receive</name>
                                   </method>
                                   <method>

...

                                        <name>BeginReceive</name>
                                   </method>
                                   <method>
                                        <name>EndReceive</name>
                                   </method>
                              </methods>
                         </called-method>
               </class>
          </classes>
     </instrument>
</dll>

About the ActivityCollector.xml file

The ActivityCollector.xml file is the main configuration file of the Microsoft .NET AppTier Collector agent that gathers activity information. It is composed of the following logical sections:•    Aggregator

  • Aggregator settings

...

  • . Contains the settings that are grouped under the aggregator tag.

...

  • Tracker settings

...

  • . Contains the settings that are grouped under the tracker tag.

The Aggregator settings sections are read when the Collector agent is loaded. Therefore, if you modify these sections, you must restart the Collector agent through Precise Agent Installer or by restarting the Precise for Microsoft .NET Collector service using the Services window.

The Tracker settings are read when the tracked Microsoft .NET instance (that is, the underlying Microsoft .NET-based process) is loaded. Therefore, if this section is modified, you must restart the Microsoft .NET instance (the underlying process). For the ASP.NET instance, you should run the IISRESET command.

The ActivityCollector.xml file is located in the <i3<i3_root>root>\products\dotnet\config directory. Its settings affect all instances on the monitored server.

If you need to define instance-specific settings, for example for the Tracker threshold, place a copy of this file in the <i3<i3_root>root>\products\dotnet\config\instance name directory and modify the settings as required.

The Aggregator and Tracker settings in this file then overrides the settings that are specified in the file that is located in the parent directory.

Example of the ActivityCollector.xml file

The following is an example for the ActivityCollector.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<activity-collector-config>
     <!-- psdn_dncol_act.exe configuration, configurable per server(default) & per instance -->
     <aggregator>
          <topnsql>5</topnsql><!-- Top N SQL statement to monitor -->
          <sla>5000</sla><!-- Red SLA breach value for top http invocations in msec. -->
          <nearsla>1000</nearsla><!-- Yellow SLA breach value for top http invocations in msec. -->
          <insane-rt>300</insane-rt><!-- Long running thread timeout in seconds -->
          <!-- The following two items are related to the Insight Smartlink feature and should not be altered by the user manually -->
          <bit-vector>false</bit-vector>
          <last-level-bit-vector>false</last-level-bit-vector>
     </aggregator>
     <!-- Tracker.dll settings, configurable per server (default) & per instance -->
     <tracker>
          <threshold>50</threshold><!-- Threshold in msec for filtering out events before forwarding it to the collector. -->
     </tracker>
</activity-collector-config>

About the ActivityCollector.xml file tags

The following table describes the important tags in the ActivityCollector.xml file. You may modify these tags only. It is not recommended to modify any other tags.

Table 13-2    Collector 2 Collector configuration file tags

Tag

...

nameDescription
activity-collector-

...

configThe top-level XML tag.

...

AggregatorThe top-level definitions for the Collector agent’s aggregator.
Topnsql

...

The top number of SQL statements to monitor.

...

SlaThe SLA (red) value (in milliseconds) for ASP.NET instance URLs.

...

nearslaThe Near SLA (yellow) value (in milliseconds) for ASP.NET instance URLs.
insane-

...

rtThe timeout value for long running threads/URLs. A method or URL that is longer than this threshold is not collected.

...

trackerSpecific definitions for the tracker.
threshold

...

The threshold (in milliseconds) for filtering events before they are forwarded to the Collector agent.

Defining the DLLs to be monitored by using the Detection agent

A Microsoft .NET instance consists of the DLLs that make up your Microsoft .NET application. For Precise for Microsoft .NET to monitor a Microsoft .NET instance, you must first define the DLLs that you want to monitor.

You can use the Detection agent to detect all relevant DLLs that are currently running in the background. Using the Detection agent involves manually modifying the instrumentation configuration file.

To detect the DLLs currently running by using the Detection agent1.    Verify

  1. Verify that your Microsoft .NET application is running.

...

  1. Open the command prompt window.

...

  1. Change directory to the <i3_root> directory.

...

  1. Run the following command:

    ...

      • Microsoft .NET Framework version 1.1. products\dotnet\install\psdn_detect_dlls.exe /im image name /f filter file

    ...

      • Microsoft .NET Framework version 2.0 and 3.0 products\dotnet\install\FW2.0\psdn_detect_dlls.exe /im image name /f filter file name

    where the parameter values should be set as follows:

      • image

    ...

      • name

    If this is an ASP.NET instance, the name of this executable depends on the Internet Information

    ...

    Server (IIS) type.

    ...

        • IIS 6: w3wp.exe

    ...

        • IIS 7: 

    If this is a regular .NET instance, the image name is the name of the .NET executable (without the path).

      • filter file name

    filter file name    The path and name of the file that lists the modules to be filtered out, as follows:
    products\dotnet\install\dlls_filter.xml
    As alternative to this step, you can also use the Process Explorer. See http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx.
    •    Save the XML output of the command to a temporary file.
    To define the DLLs in the instrumentation file
    1.    Open the following file in an editor:
    <i3_root>\products\dotnet\config\instrumentation.xml
    2.    Within the XML output that you saved in step 5 above, locate the <module name> tag for a DLL file you want to instrument and copy the file name.
    For example, if you want to instrument the file petshop.web.dll, copy its name from the line <module name="petshop.web.dll">.
    1.    In the instrumentation file, paste the name of the DLL file into the entry for the instance that you want to monitor.
    For example:
    <instances>
    <instance name="AspNetIIS6" >
    <dlls>
    <dll name="petshop.web.dll"/>
    ...
    </dlls>
    </instance>
    </instances>
    2.    Repeat step 2 and step 3 for each DLL file that you want to instrument.
    3.    Restart your Microsoft .NET application for the changes to take effect.

    ...