toString or not toString

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

Read the full article on the Dynatrace Community Portal: toString or not toString

Andreas Grabner has 20+ years of experience as a software developer, tester and architect and is an advocate for high-performing cloud scale applications. He is a regular contributor to the DevOps community, a frequent speaker at technology conferences and regularly publishes articles on You can follow him on Twitter: @grabnerandi