Spring Boot

Spring Boot Web Application

On this page, we help you install ShortLoop Java SDK in your Spring Boot web application, so that it can automatically sample traffic.


Add ShortLoop Java SDK as a Maven or Gradle dependency



Add the following in your application's or application.yaml configuration file.

shortloop.applicationName=service-name                 # your application name here
shortloop.environment=env-name                         # your application environment (Eg. stage, prod, alpha, etc.)
shortloop.url=       # the shortloop url for your org. (Provided by ShortLoop team.)
shortloop.authKey=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # shortloop Auth Key. (Provided by ShortLoop team.)
shortloop.maskHeaders=cookie,x-auth                    # [Optional]. The following headers values will be masked at the SDK level itself. (Will not be sent to the server)

Register SDK with Spring by adding the following piece of code on top of your application's entry class.

import dev.shortloop.agent.ShortloopAutoConfiguration;

After adding the above, your application's entry class file (ex: should look something like this:

import dev.shortloop.agent.ShortloopAutoConfiguration;
public class Application {
  public static void main(String[] args) {, args);


Quickly test if project is building after configuring SDK.


Build command maybe custom to your project.

mvn clean install

After the changes, redeploy your Spring Application.

Feel free to email for a quick support, reporting bug or improvements suggestions. Sumit B Mulchandani (

Copyright © 2023 ShortLoop, Inc. All rights reserved.