The Spring Framework is a leading framework used on the Java Virtual Machine (JVM) to build web applications and modern distributed systems. New Relic has supported Spring applications and services from the beginning, so we are excited to announce our support for the latest version, Spring 5 in New Relic APM.
Spring 5 includes many improvements, but the cornerstone is WebFlux. WebFlux is a new web framework that provides non-blocking I/O for incoming requests and outbound web client calls. It encourages a reactive coding style that is ideal for high-throughput services.
New Relic APM monitors Spring 5 services by identifying incoming requests, naming them based on annotations or route functions, and tracking the activity of route handlers and other methods. You can use New Relic to identify bottlenecks and service failures whether you use Spring WebFlux or Web MVC.
New Relic tracks the cross-thread activity of WebFlux routing and WebClient external calls. You can use the New Relic async API if you have custom async handling within your reactive service, and you can use New Relic’s @Trace annotation to record method call time for other methods such as your route handler.
With this instrumentation, New Relic distributed tracing shows your Spring 5 service calls in the context of your distributed system; you can trace activity from your Spring 5 service to other services that use different frameworks or languages. For a self-contained service, you can run your services using Spring Boot, or with app servers such as Apache Tomcat and Eclipse Jetty. You can write your code using Java or Kotlin. (Learn more about Spring5’s Kotlin support here.)
With a distributed microservice architecture, it’s more important than ever to have effective and complete monitoring, both for activity within your microservices, and their relationship to other services. If you want the best insight into your Spring 5 services, simply install the latest New Relic APM Java agent. You’ll get the visibility you need so you can move fast with confidence.
The views expressed on this blog are those of the author and do not necessarily reflect the views of New Relic. Any solutions offered by the author are environment-specific and not part of the commercial solutions or support offered by New Relic. Please join us exclusively at the Explorers Hub (discuss.newrelic.com) for questions and support related to this blog post. This blog may contain links to content on third-party sites. By providing such links, New Relic does not adopt, guarantee, approve or endorse the information, views or products available on such sites.