Works with: |
You can use data collectors to supplement business transaction and transaction analytics data with application data. The application data adds context to business transaction performance issues. For example, they may show the values of particular parameters or return values for business transactions affected by poor performance.
This data shows the business context affected by performance issues, such as the specific user, order, or product.
There are two types of data collectors:
See Collect Transaction Analytics Data.
When applied to business transactions, the data collectors supplement the information shown in transaction snapshots. The information captured by HTTP data collectors appears in the HTTP DATA and COOKIES sections, while method invocation data appears in the Business Data section.
To view collected data:
To configure data collectors, you need the Configure Diagnostic Data Collectors permission. Follow these steps to configure a data collector:
Identify the method on which to capture data. To do this, define the method signature and (optionally) filters based on the value of a code point in the method (such as, return value or argument).
Specify the actual code point that serves as the source of the data.
If the data collector applies to business transactions, then select the applicable business transactions.
When creating a data collector, you typically need to know the code on which you are setting up the collector, and whether it is based on access to the source code for the application, or its documentation. For the JVM 1.5 and .NET application environments, you must restart the JVM or application server if your method invocation data collector results in modifications to instrumentation configuration (class name, method name, method parameters, and so on).
These platform-specific considerations apply to data collectors:
For C/C++ SDK: Create a method data collector using the appd_bt_add_user_data function()
, not the Controller UI as described here. See C/C++ SDK Reference.
addSnapshotData()
Node.js API, not the Controller UI as described here. See Node.js Agent API Reference.add_snapshot_data()
Python Agent API. See Python Agent API Reference.access(user.name)
attribute, access(user['name])
key-value, and calling(user.getName()
method.For PHP method data collectors, only the with a Class Name that option is valid. You cannot add a method data collector to a standalone PHP function.
You can add a data collector directly from a transaction snapshot through the call graph. This automatically adds the class and method for you.
Data collectors can be manually configured in at least two ways.
From the left pane:
From a call graph:
Note the following platform-specific considerations applicable to data collectors:
appd_bt_add_user_data function()
, not the Controller UI as described here. See C/C++ SDK Reference.addSnapshotData()
Node.js API, not the Controller UI as described here. See Node.js Agent API Reference.add_snapshot_data()
Python Agent API, not the Controller UI. See Python Agent API Reference.PHP method data collectors - Only the "with a Class Name that" option is valid. Also, you cannot add a method data collector to a standalone PHP function.
The general steps for configuring a data collector are:
Typically, creating a data collector requires knowledge of the code on which you are setting up the collector, whether based on access to the source code for the application or its documentation. For some application environments, including JVM 1.5 and .NET, you will need to restart the JVM or application server if your method invocation data collector results in modifications to instrumentation configuration (class name, method name, method parameters, and so on).
com.appdynamics.model.Item
Bookstore.Item
book
Is this Method Overloaded: If this is an overloaded method, then add parameters that identify the signature. You must create a data collector definition for each form of the method for which you want to capture data. For example, given the overloaded method in this table, to capture data for only the second two forms, you would need to create two data collectors. The parameters to configure are shown:
Signature | Parameters to Configure |
---|---|
getName() |
|
getName(int studentId) |
|
getName(int studentId, string name) |
|
You can refine the method selection to meet specific conditions. If you configure more than one match condition, then all match conditions must be satisfied by the request for the data collector to be applied to the request.
Once you identify the method, specify the code point from which you want to capture data, such as the method return value, argument, or a value captured by the getter chain on the invoked object. Configure this code point in the Specify the Data to Collect from this Method Invocation section of the configuration settings.
HTTP data collector can capture data from HTTP parameters, request attributes, cookies, and other data. The names of these properties need to match exactly: no wildcards are supported. Notice that the Content-Length HTTP header is already captured in as the Average Request Size metric. However, you may choose to configure a data collector for this header to have the value appear in transaction snapshots, providing you insight into, for example, whether message size corresponds to slow performance.
You can configure multiple data collectors. The effect of multiple data collectors is cumulative. For example, if you add a custom data collector that does not include the collection of the URL HTTP request attribute, but keep the Default HTTP Request Data Collector configuration in which the URL is configured to be collected, then the URL is collected.
Method invocation data collectors are applicable to Java and .NET.
In this example of a manual setup (not using the wizard), we'll set up a method invocation data collector on a Java application. We want to create a data collector on the method getCartTotal()
, which is shown in this code snippet with the method getUser()
and which we will use later as a data source.
|
To configure a data collector for an application, add a data collector and then configure it:
user.getCustomerName
. This code snippet is an example of how to capture the user name on the invoked object. The Cart
class instantiates a User
object based on the following class in the same package as Cart
. Note that the User class includes a method for returning the name of the user, getCustomerName()
.
|
Using a getter chain, you can identify this method as another data source in the same data collector. For example, you could select Invoked Object as the source of the data. The getter chain getUser().getCustomerName()
is the operation on the invoked object.
For the PHP agent, if a method return value collected by MIDC is not stored in any variable, it is seen as null in both snapshot and Analytics data.
After you configure the method invocation data collectors, you can click Configure Transactions using this Data Collector on the Instrumentation pane to drag and drop (or highlight and move) the transactions to a given data collector.
When complete, transaction snapshots for slow, very slow, and stalled transactions, the transaction snapshots will include the specified user data.
In the HTTP Data Collector configuration, specify the request data that you want to display in the snapshot.
To configure a data collector, add a data collector and then configure it: