By defining request attributes for your service requests, you can enable advanced filtering of service requests across all Dynatrace analysis views. Once configured, request attributes help you to better understand the relationships between performance, errors, and application-specific metadata in your requests.
In many cases, you end up in a situation where you want to capture an argument of a method and the method is called multiple times. Sometimes you’re only interested in a specific value. In other cases, you may only want to count the executions or average the captured values. Within other values, the argument in question may be a complex object and you’re really only interested in one aspect of the object.
To tackle such situations, you can use the Data type and the Aggregation on request drop lists when you define or configure a request attribute.
Choose & aggregate
It’s important to note that aggregation is applied not only within a single data source (for example, a method rule) but also across multiple data sources. The order is defined by:
- Order of the data source rules
- Order of the method rules within a method data source
- Order of the method executions in your application (when a method is executed multiple times)
For text attributes, you can choose between the following options:
- First occurrence
- Last occurrence
- Set of distinct values
The Set of distinct values option enables you to use all distinct values found in a request for filtering. For example, say a request captures a request attribute called
Product and two values are captured for this attribute,
Video. You can filter by either of these values to find the request in question.
For integer or floating point values, you can additionally use the following aggregations:
- Minimum of captured values
- Maximum of captured values
- Average of captured values
- Sum of captured values
This makes a lot of sense when a value in question is numerical, for example, a metric or revenue.
The last two options are:
- Count occurrences
- Count distinct
If you choose one of these options, the data type changes to integer automatically. These settings are useful when you’re counting something.
Filtering numeric values
When you have an attribute that represents a number, you need to consider multiple filtering options. Attributes that have the data type Integer or Double can be filtered in multiple ways (see below).
The two fields are both optional. If neither field is specified, Dynatrace checks for the existence of the attribute. If you specify both fields, the filter returns only those requests that have the specific attribute within the defined value range.
Deep object access
A value that you’re interested in may not be available as a simple argument, but rather as part of a complex argument object or even a member variable of a class you’re looking at. Such values can still be easily accessed. As shown in the example below, you can access not only argument values and return values, but also objects itself. Whenever an item to be captured (be it an argument or an object) is a complex object, you have the ability to define a method (chain) that enables deep access into the object. The example below uses the method
getBookingCode. You can even execute a chain, for example,
Note: The deep object access feature introduces new code into your application that must be executed. As such, it may change the state of your application or introduce performance impact. So, use this feature with caution.