Operations | Monitoring | ITSM | DevOps | Cloud

Exception Handling in Java (with Real Examples)

Java has been one of the most widely used programming languages among developers worldwide for years. So naturally, it is a popular choice for those beginning their careers in development. Learning Java requires more than just knowing the proper syntax and effective code hygiene. Any developer who hopes to use Java for commercial development must be able to quickly and competently identify and recognize errors in their code.

Garbage Collection in Java

Garbage collection in Java is a familiar term in the coding world. You will come across it when learning the Java programming language. Because it’s built into Java memory management, the garbage collector is one of Java’s crucial features. It helps prevent serious errors and allows programmers to create new objects without worrying about unwanted objects.

IllegalArgumentException in Java

Let’s look at IllegalArgumentException, which is one of the most common types of exceptions that Java developers deal with. We’ll see when and why IllegalArgumentException usually occurs, whether it’s a checked or unchecked exception, as well as how to catch and when to throw it. We’ll use a few examples based on common Java library methods to describe some of the ways to handle IllegalArgumentException.

Debugging Java Collections Framework Issues in Production

The Java Collections Framework was a huge leap forward when it was introduced as part of Java 2 (JDK 1.2). Thanks to the included collection classes we finally moved beyond the limits of Vector and Hashtable to more mature and generic solutions. With the introduction of streams and functional concepts in Java 8 the framework took everything to the next level. One of the core principles underlying the framework is coding to the interface.

How to capture Spring Boot metrics with the OpenTelemetry Java Instrumentation Agent

In a previous blog post, Adam Quan presented a great introduction to setting up observability for a Spring Boot application. For metrics, Adam used the Prometheus Java Client library and showed how to link metrics and traces using exemplars. However, the Prometheus Java Client library is not the only way to get metrics out of a Spring Boot app. One alternative is to use the OpenTelemetry Java instrumentation agent for exposing Spring’s metrics directly in OpenTelemetry format.

13 Best Performance Monitoring Tools for Java

The Java programming language is simple to learn and use, and it is frequently used by web developers to create applications. However, monitoring the performance of a Java-based application might be difficult because it is not a simple process. Implementing multiple monitoring tools to track Java logs, metrics, infrastructure data, and other operational factors is necessary for troubleshooting inefficiencies.

Debugging the Java Message Service (JMS) API using Lightrun

The Java Message Service API (JMS) was developed by Sun Microsystems in the days of Java EE. The JMS API provides us with simple messaging abstractions including Message Producer, Message Consumer, etc. Messaging APIs let us place a message on a “queue” and consume messages placed into said queue. This is immensely useful for high throughput systems – instead of wasting user time by performing a slow operation in real-time, an enterprise application can send a message.

Java vs Python

Computer science is crucial to our lives today, and programming languages play a fundamental role. These languages act as a programmer’s toolbox. However, choosing a language can be challenging, especially when deciding between the two most popular options. These options include Java and Python. Java and Python are widely used as general-purpose programming languages for desktop and web applications. There are many similarities when comparing the two, but there are also significant differences.

Spring Transaction Debugging in Production with Lightrun

Spring makes building a reliable application much easier thanks to its declarative transaction management. It also supports programmatic transaction management, but that’s not as common. In this article, I want to focus on the declarative transaction management angle, since it seems much harder to debug compared to the programmatic approach. This is partially true. We can’t put a breakpoint on a transactional annotation. But I’m getting ahead of myself.

Troubleshooting Spring Boot applications with Sentry

Some months ago we wrote a quick guide on how to use Sentry with Spring Boot and Logback. Since then, we’ve continued working on improving the development experience, added several features for error reporting and, most importantly, implemented the performance feature in Sentry Java SDK with a dedicated integration with Spring MVC. If you haven’t yet used Sentry in a Spring Boot application - nothing to worry about - you will find all the necessary steps below.