A comprehensive set of turnkey infrastructure integrations

Including dozens of AWS and Azure services, web, database, network, containers, orchestrations like Docker and Kubernetes, and more.

START FREE TRIAL

Complete visibility into the health and performance of applications and their underlying infrastructure

Quickly pinpoint the root cause of performance issues across the stack, down to a poor-performing line of code

START FREE TRIAL

Custom metrics and analytics

Analyze custom infrastructure, application, and business metrics

View Custom Metrics Monitoring Info
Powerful API that makes it easy to collect and create any custom metric

Achieve ultimate visibility and enhanced troubleshooting with synthetic and real user monitoring

START FREE TRIAL

Free APM Software

Catch bugs early on, and gain full visibility and insights into the applications you’re developing

View Product Info
Free, full-function APM tool for testing and troubleshooting application performance before moving into production

Dev Edition includes five traces per minute, 100 metrics, three hosts, and six containers

GET FREE TOOL

Log Management and Analytics powered by SolarWinds Loggly

Integrated, cost-effective, hosted, and scalable full-stack, multi-source log management

View Log Management and Analytics Info
Collect, search, and analyze log data in addition to your metrics and traces to quickly pinpoint application performance problems

Reduce mean time to resolution (MTTR) by quickly jumping from a trace or host view into the relevant logs to accelerate troubleshooting

START FRE TRAIL

Digital Experience Monitoring Powered by SolarWinds Pingdom

Make your websites faster and more reliable with easy-to-use web performance and digital experience monitoring

View Digital Experience Monitoring Info
Add client-side web application performance monitoring. Provide maximum observability by adding the user’s perspective.

Achieve ultimate visibility and enhanced troubleshooting with synthetic and real user monitoring

START FREE TRIAL

Java® was presented as a no-cost solution with the benefit of being a “Write Once, Run Anywhere” language when it was released publicly in 1995 by Sun Microsystems®. Many years and almost as many versions later, Java is now one of the most prominent computer languages in the industry. Java-based applications power banking, commerce, and a host of other sectors.

As with any computer system, Java applications and services are invaluable when running as they should, and as engineers, it is our job to ensure that they are robust and keep running as efficiently and effectively as possible. In this article, we’re going to look at one key element of keeping your Java applications operating properly. Monitoring is the process whereby a computer system is configured to report on key metrics, which are analyzed to display the near real-time health of the system, and integrated with logic constraints to alert operations personnel when the system begins trending towards less-than-optimal performance.

Developing a Solid Monitoring Plan

Whether you are implementing a new system or maintaining an existing Java-based ecosystem, having a comprehensive and well thought-out monitoring plan is vital to the success of your project. There are two types of metrics that we need to be concerned with—those related to the Java Virtual Machine (JVM), and those related to the underlying infrastructure.

Specific Considerations for Java

Let’s look at specific metrics that should be monitored on a Java-based system, as well as the reasons why they are important.

Java Heap Usage

The Heap is the allocated portion of the computer’s memory for the creation and storage of objects. The JVM will be unable to create additional objects if this space has already been consumed. At the very least, the JVM may pause and experience a degradation in performance, or the JVM may abruptly terminate.

Potential problems in the application (which can result in problems for Heap usage) are the inadequate allocation of Heap memory when the application is started, or a memory leak. In the case of the latter, a constant increase in Heap usage over time is often observed.

Garbage Collection

Closely related to the Heap is the Garbage Collector (GC). This process is responsible for identifying objects that are no longer in use, and can be removed to free up space for the application. This necessary process is very resource-intensive, so if the JVM is initiating it too often, or if it is being run for extended periods, it can be indicative of a memory leak, or simply necessary additional tuning.

GC metrics are different for each application, and monitoring them over time will help to identify trends and indicate when improvements may be needed.

Active Threads

Threads are how applications process their work. Highly performant applications can complete their work quickly and free up their threads. A high count of active threads may indicate that the system is processing a higher-than-expected load, and may lead to decreased performance over time.

Response Time

Computer applications are written to perform tasks quickly and efficiently. Response time is a direct measurement of how quickly an application is responding to requests. Analyzing this metric over time allows you to create a performance baseline, and deviations from this baseline may indicate that something is wrong—either with the load being processed by the server, or there could be an internal issue.

Key Infrastructure Metrics

In addition to monitoring the health of the JVM, it is also important to monitor the supporting infrastructure and any supporting systems. For a Java application, this would include the application server as well. Some examples would be Jetty®, Netty, or Tomcat®.

Infrastructure Specific Metrics

  • CPU Utilization
  • Memory Usage/RAM
  • Available Threads
  • Open File Descriptors
  • Database Connections
  • SLA
  • Latency
  • Success of API Endpoints
  • Average Response Times
  • Errors and Exceptions
  • Health and Status of Dependencies

Related articles

© 2024 SolarWinds Worldwide, LLC. All rights reserved.