Monday 12 May 2014

Application profiling and monitoring with dynaTrace

  What is the use of DynaTrace:
  

       DynaTrace Software is a leading application performance management tool and is being widely used.DynaTrace is a new generation tool it comes with advanced features for monitoring Java and .NET applications, which aids to identify bottlenecks or errors in the application easily. 

          Its patented PurePath technology provides one of the most accurate and detailed view of application behavior.PurePath technology used in DynaTrace provides end-to-end transaction level details from browser, across all tiers and database. It started as a tool which profiles applications and gives detailed information at a code level during load, and evolved as a product that can be used in continuous development and in production environments.It helps to uncover performance issues even at the code level and also details of transactions invoking external services.This tool detects abnormalities in response time, transaction rate, throughput and system usage.

        In some cases the solution may consist of modules written in Java, C++ and .NET. Understanding how such complex system works, finding its potential bottlenecks and pinpointing various configuration or integration issues could be a challenging task. Add the usual time constraints to the picture or maybe the pressure from a customer with production environment issue and you will see why we had to find a tool to ease our lives. When we started looking for a solution to our problems we had the following criteria:

  • The tool should provide visibility of a transaction across all tiers, from the front end browser/client through various server layers and into the backend DB layer
  • We were looking at how easy it is to install, configure, capture information, analyze information and subsequently pinpoint a problem.
  • The ability to use the tool regardless of the project nature.
  • Ability to share the results easily between the members of the team. Best candidate should have good separation of the Collecting profiling information part and Analysis part, as profiling and collecting of results could be done by one team (Delivery, QA) and analyzed by other (Development).
  • Non-intrusive installation, i.e. to be pluggable in customer environment without
    needing special permissions or endangering environment’s integrity.
DynaTrace installation and configuration 





The main components of dynaTrace are shown in the picture above. It consists of:
  • dynaTrace agents (located in the different product tiers, collecting raw data)
  • dynaTrace PurePath collector. Responsible for collecting transactional data sent from different agents. Could reside on the same box as the server
  • monitoring Collector – collects environmental information on different machines
  • dynaTrace Server – real-time and root-cause analysis of collected data. Since this analysis of data is happening away from the monitored application, the agents do not bring ‘noise’ in the monitored product.
  • dynaTrace client – the client is used to connect to the server and get and display the information to the user
  • browserAgent – a client side agent, that is installed in the browser (IE and FF are supported), and that provides information for browser network, javascript executions, page loading times, etc.
       Despite of the complex look of this picture, the installation of each component is very easy. In fact, all of them could reside on one box (except the agents, of course) but it is recommended for the collectors to be ‘close’ to the monitored application (e.g. same network).

       Installing agents in the monitored product is just copying them on the box and adding additional line in the Java startup command line, as simple as:
agentpath:/DTHOME/agent/lib/libdtagent.so=name=backendAgent,server=dtserver

      Once you have installed everything, started your product and started to use it, dynaTrace will draw a picture of your system similar to the one shown on the next screenshot.





DynaTrace in action

During our first steps with the tool we got a really strange visual representation of the system we were monitoring. Instead of one DB server we were seeing two separate DB servers. From the name of the machine we were able to identify that there was an issue with the configuration. It was just a single incorrect line in one of the configuration files pointing to incorrect DB server with the same credentials. Obviously this is not something that you’ll get in production environment but illustrates how easy it is to spot a problem with a tool that otherwise could take some time to identify.





Another example from the first days of using dynaTrace was discovering that one of the servers was returning errors during execution. You can see that the visual representation of the whole system helps in noticing the problem, where it is occurring – you can see the faulty machine marked in red.





After drilling down deeper it lead us to the root cause, in this case lots of HTTP 404 errors, because of a missing resource on the server. See it on the next screenshot.





       The real power of dynaTrace got revealed when we ran some performance tests and during dynaTrace analyses it was visible that in one particular module of the system we spend huge percentage of the time in thread synchronization.




      We were able to drill down and to find quickly and easily which are the methods having the biggest impact and started fixing the problem (next screenshot).





       Overall, dynaTrace is quite suitable for usage in complex environments with multiple tiers and interactions with external systems. Also, it could greatly help for spotting issues in production environments that are hard for reproducing in a test lab. Its server can be installed in one central location and used by multiple teams in different locations for collecting and analyzing results.

      For example, provided below is the purepath  snapshot of a transaction which took high response time. i.e. > 93 seconds.[SLA : 2 seconds]Just a click on the transaction name and DynaTrace drills down to the exact web service operation, checkoutItem and displays the exact child method which consumes time.

Chkout_DT.JPG           DynaTrace helps in optimizing the performance of web, non-web, mobile, streaming and cloud applications.It supports VMWare and EC2 based clouds. This can be integrated with major testing tools like LoadRunner and SilkPerformer. Dashboards which can be customized according to the requirement is another feature of this tool that aids reporting.

No comments:

Post a Comment