I recently was in Tallinn for a conference called TopConf and a local Docker meetup. And you might think that this doesn’t have much to do with the title of this post but actually it does. Tallinn is also where you’ll find ZeroTurnaround’s HQ. ZeroTurnaround being the company behind XRebel. And while I tweeted I was there Simon Maple saw it and invited me to a tour of their local office. I can now invite you to a tour of the XRebel and Couchbase integration.

What’s XRebel?

It’s a performance tool for Java Web Apps. From their website:

Use real time performance insights to understand and resolve potential issues faster and earlier, during the development phase. Master your business applications to reduce rework, minimize technical debt, and improve end-user experience.

It integrates with various message queues and databases, one of the latest being Couchbase. It gives you a comprehensive overview of all the call made to your backend each time you send a request to the server.

How do I try this?

Just go on ZeroTurnaround website and download the latest version do XRebel. Unpack it and make sure you remember where as you will need its location. It works more or less automatically because it’s a Java Agent. Each time you run a Java process you need to declare the path to that agent in the JVM configuration. If you are launching your app by using java it would like this:

java -jar -javaagent:[path/to/]xrebel.jar myApp.jar

Or if like me you are using Maven and a Spring Boot application:

mvn spring-boot:run -Drun.agent="[path/to/]xrebel.jar"

If the agent was picked up right, you should see the following message logs:

Now XRebel will hook itself to a servlet you have running and start injecting some HTML code automatically so you can access their dashboard. Here’s an example using an application I did for a previous blog post:

As you can see XRebel gives you a good indication of what is going on for each call you make. You can see the whole stacktrace, and the details of each Couchbase operations you do whether it is Key/Value, N1QL query or fulltext search.


Posted by Laurent Doguin, Developer Advocate, Couchbase

Laurent is a Paris based Developer Advocate where he focuses on helping Java developers and the French community. He writes code in Java and blog posts in Markdown. Prior to joining Couchbase he was Nuxeo’s community liaison where he devoted his time and expertise to helping the entire Nuxeo Community become more active and efficient.

Leave a reply