This page applies to an earlier version of the AppDynamics App IQ Platform.
For documentation on the latest version, see the 4.4 Documentation.


On this page:

Related pages:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
59 rates

Sometimes applications use frameworks the .NET Agent doesn't automatically detect. This is frequently the case with Windows services and standalone applications. AppDynamics lets you specify entry points using custom match rules for Plain Old CLR Objects (POCOs). Once you've defined POCOs, AppDynamics measures performance data for POCO transactions the same as for other transactions.

Define the custom match rule on the .NET class/method that is the most appropriate entry point for the business transaction. Someone who is familiar with your application code should help make this determination.

Defining a POCO Entry Point

On an originating tier, a POCO entry point is the method that starts the business transaction. If the POCO entry point is on a downstream tier, it may correlate to an upstream exit point. When defining a POCO entry point, it is important to choose a method that begins and ends every time the business transaction executes. For more on entry points, see Business Transactions.

Good candidates for POCO entry points include the following:

  • A timer in a Windows service that executes a database call to check for new records to process. For example, an order processing system that periodically checks for new orders in the system.
  • A loop in a standalone application that batch processes records via a web service call. For example, an expense reporting system that loops through approved expenses to submit them for reimbursement.
  • A method in a web application that executes every time a client connects. For example, consider the method execution sequence:
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;

namespace MyService
{
class MyProgram
{
    static void Main(string[] args)
    {
        TcpListener myList = new TcpListener(IPAddress.Parse("127.0.0.1"), 8000);
        using (Socket s = myList.AcceptSocket())
            Task.Factory.StartNew(DoWork, s);
    }
    static void DoWork<Socket>(Socket s)
    {
        // ...
    }
}
}

The AcceptSocket() method is the blocking method that accepts a job and invokes it. The MyProgram.DoWork() method is the unit of work because it executes every time a client calls the business transaction and it finishes at the same time as the business transaction. This makes DoWork() a good POCO entry point.

Transaction Discovery Tool

AppDynamics includes a Class/Method browser in the Transaction Discovery Tool to help you create POCO entry points.

  1. Navigate to Configuration > Discovery Tools and click Start Discovery Session.
  2. Select the nodes where you want the agent to discover business transactions.

    • You can run the discovery session on more than one node on a single tier.

    • After creating the POCO custom match rule, use Copy or Configure all Tiers to use this Configuration on the Transaction Detection tab to copy the POCO rule to one or more tiers.

      The Transaction Discovery window doesn't automatically display .NET transactions before you open the Class/Method Browser.

  3. Click Class/Method Browser.

  4. Select your match criteria: interface name, superclass, annotation, or class name.
  5. Specify a string to match and press Enter.
    • The .NET Agent searches using a case-sensitive substring match. Wildcards are not allowed.
    • You can leave the Transaction Discovery window while the agent searches for methods and return to it later.
    • The Controller displays matching classes from the assemblies that have been JIT-compiled.
  6. Expand a class to display methods to instrument.
  7. Right-click a method name and click Create Poco Rule.
    The New Business Transaction Match Rule window opens. The Transaction Discover Tool automatically populates the Match Classes and Method Name fields.
  8. Continue with transaction configuration described below. 

Create a POCO Transaction Match Rule

By default, once you configure a custom match rule for a POCO entry point, the .NET Agent detects and displays it in the Business Transactions list. AppDynamics names the BT for the name of the custom match rule. For more information, see Business Transaction Detection.

To set up a POCO entry point, create a custom match rule for a .NET Class/Method. For steps to access the Custom Match Rules pane, see To create custom match rules for .NET entry points.

  1. Name the New Business Transaction Match Rule.
    • AppDynamics uses the rule Name to name the BT.
    • The Controller enables the rule by default. Disable it later if needed.
    • The POCO is a foreground task, to configure it as a background task, see POCO Transaction as a Background Task.
  2. In the Transaction Match Criteria tab, specify the Match Classes criteria.
  3. Specify the Method Name match criteria.
  4. Click Create Custom Match Rule. If you are configuring at the application level, click Configure all Tiers to use this Configuration.
  5. Click OK to the notification message Instrumentation changes require restart.
    After you save the rule, it appears in the Custom Match Rule list. The business application or tier you customized displays a green check in the Select Application or Tier pane.
  6. Wait one minute and restart the CLR/application.

The next time the POCO method executes, the agent detects it and registers the entry point. If the entry point is on an originating tier, the Controller displays it as a business transaction in the Business Transactions List.

The agent identifies all the qualifying transactions using the custom match rule. In some situations you may need to further refine the discovery rules. Use the splitting options on the Transaction Splitting tab.

If you create an application-level POCO that applies to a tier that has not yet registered with the Controller, you may need to restart the application after the tier registers in order to see the business transaction.

POCO Transaction as a Background Task

Click the Background Task check box in the Business Transaction Match Rule window to indicate that a POCO transaction runs in the background.

When a request runs as a background task, AppDynamics reports only Business Transaction metrics for the request. It does not aggregate response time and call metrics at the tier and application levels for background tasks. This prevents background tasks from distorting baselines for the business application. Also, you can set a separate set of thresholds for background tasks. See Monitor Background Tasks.