Blog |

Introducing our new Java Spring Error Monitoring SDK

Introducing our new Java Spring Error Monitoring SDK
Table of Contents

We’re excited to announce that we’ve strengthened our solution for Java Spring exception handling. Spring developers can now integrate Rollbar into their Java Spring Boot and Spring Web MVC applications even more quickly and easily. With our new SDK, instrumentation and getting real-time actionable error alerts takes just a few minutes.

Spring has consistently been one of the most popular Java frameworks and we want to make sure we’re consistently offering the best possible solution for it.

Get Real-time Error Alerts with Code Context

Nobody likes to find out about errors from end users. For those unfamiliar with Rollbar, you can get real-time notifications of all errors with code context and metadata before your users get impacted. With telemetry, local variables, stack traces, and git blame all available at a click, debugging Spring errors can be a lot faster and easier.

Spring Error Items List

Here you can see the exact line of code that caused the error along with the avatar of the last person to edit that line of code -

spring error item detail gitblame

Notable Improvements

  1. Any exceptions raised by Spring will be handled automatically by Rollbar. Users don’t need to manually catch and send the exceptions. However, they do have the ability to catch and send custom events to Rollbar for debugging.
  2. The new integration automatically includes all the settings required for Spring, minimizing the number of changes and customization required by the users.
  3. The default setup already includes helpful components such as request's URL, parameters, etc. that can be powerful when debugging web applications.

How to Configure Rollbar for Java Spring

The configuration process takes just a couple of steps -

  1. Grab the SDK by adding the following to your Gradle dependency

    compile('com.rollbar:rollbar-spring-boot-webmvc:1.7.2')
  2. Configure Rollbar with your access token

    @Bean
    public Rollbar rollbar() {
        return new Rollbar(RollbarSpringConfigBuilder
                           .withAccessToken('').build());
    }

Try it Now

You can check out our docs to learn more and start using Rollbar to monitor and debug your Spring applications. As always, we would love to hear any feedback you might have for us.