This article was contributed from Keith A. Marshall, Lead Developer at Insight North America.

Planning ahead has been my approach for the use of the dynaTrace. As much as dynaTrace is there to allow me to triage and investigate production issues at runtime, I believe that there is greater value in using the system as much as an early warning system as one that looks into currently running transactions.

One of the additional benefits of the dynaTrace software is the ability to further enhance the information presented in the diagnostics cockpit by making use of the ‘toString’. One of the standard methods defined in java.lang.Object is toString. This method is used to obtain a string representation of an object. You can (and normally should) override this method for classes that you write. The toString method may occasionally be used more formally, however. An example is a simple mechanism for translating an object into a well-defined textual form (toString) and back again (valueOf). In this case, it is particularly important to specify the exact form of such text in javadoc. When implementing toString, StringBuilder can be used instead of the + concatenation operator, since the StringBuilder.append operation is slightly faster

Example of toString override in a Java Class

Let’s put this into action

Now that you have made the changes to your Java objects, and overrode the toString method to create strings of the object data that are relevant to the transaction in which the object is being used. For Example, a User Profile object would contain pertinent information about the user; user id, roles, location, etc. A Sales Document object may contain info about the items sold, number of line items, etc, etc.

In the image below we can see that the Argument field in the details contains the toString info from the Sales Document object. Please also not that there is additional value in making use of the Return values from the method called objects also.

How do I ensure that the Arguments and Return values are going to be included in the filtering?

The Method Rule Properties - Edit this Method Rule, is the location where you will define the method arguments that will have the toString method read.

The resulting data as shown in the example below may then be used for Business Transaction Reporting

This gives great additional value to the business teams and allows a more in-depth evaluation of the business transactions.

Business Transaction Filtering

Now, with your toStrings in place and the new build deployed, you may now begin to see the additional values showing up in the pure path information. It is now time to refine or create business transactions that will filter based on the new toString data.

For more information on Business Transactions see

Further Reading

Selected Topics

Not Logged In? Customers and AJAX Edition Users Login with your Community Account