Softprobe Logo

Create Application

Step 1: Create application

  1. Go to Traffic and click "+" in the top left corner to create a new application. Enter the application name.

新建应用

  1. After successfully creating a new application, as shown below, the startup parameters for the Agent and the download link for the Agent will be automatically generated. Click to download the latest version of Softprobe Agent Java.

新建应用

The parameters:

java - javaagent:</path/to/sp-agent.jar> -Dsp.service.name=1a2caf7394756ca3  -Dsp.storage.service.host=Softprobe-storage-alb-1475960894.us-west-2.elb.amazonaws.com -Dsp.api.token=trip:712Vqq3/oa72aOrroBUsDYYrM+OQWQmqg4GAMHOWYhkCmswuWtIlP0CMhfKCPz6NypTloF4o9OTFlhTVRlLXmw== -jar <your-application.jar>
  • </path/to/sp-agent.jar>: sp-agent.jar is the name of the Softprobe Agent JAR package. Replace </path/to/sp-agent.jar> with the actual directory path where the Softprobe Agent JAR file is stored.
  • <your-application.jar>: Please modify your-application to the name of the service you want to record.
  • If you encounter conflicts between the Softprobe Agent and other agents (such as the OpenTelemetry Agent), you can resolve this issue by adding specific parameters to the startup arguments:
    -Dsp.ignore.type.prefixes=io.opentelemetry
    -Dsp.ignore.classloader.prefixes=io.opentelemetry

In the event of conflicts with other agents, you can add multiple prefixes to the corresponding parameters separated by a comma (,):

-Dsp.ignore.type.prefixes=io.opentelemetry,other.agent.prefix
-Dsp.ignore.classloader.prefixes=io.opentelemetry,other.agent.prefix
  • To view the Agent's logs, add the debug parameter: -Dsp.enable.debug=true

Please modify the parameters within the "< >" according to the situation, and then you need to paste the Agent parameters into the service where you want to start recording the application.

Step2: Segmenting Traffic based on varying environments

In Softprobe, you can add different environment labels for the recorded traffic. This is to help users flexibly filter and replay traffic according to the labels to meet the test scenarios of specific environments or requirements. For example, users can select the corresponding traffic for replay based on different environment labels to verify the performance and stability of the system in different environments.

To do this, you need to add the parameter: -Dsp.tags.env=<xxx> to the Agent startup parameters, after which the recorded traffic will be automatically tagged with env:<xxx>.

Step 3: Deploy Softprobe Agent

The Softprobe Agent can be deployed using various methods, including:

Configure Java Parameters

Paste the startup parameters of the Agent you just generated and run it to start the Agent to run the application:

java -javaagent:</path/to/sp-agent.jar> -Dsp.service.name=1a2caf7394756ca3  -Dsp.storage.service.host=Softprobe-storage-alb-1475960894.us-west-2.elb.amazonaws.com -Dsp.api.token=trip:712Vqq3/oa72aOrroBUsDYYrM+OQWQmqg4GAMHOWYhkCmswuWtIlP0CMhfKCPz6NypTloF4o9OTFlhTVRlLXmw== -jar <your-application.jar>

Deployment Configuration File

You can create a new configuration file sp.agent.conf as shown below:

sp.service.name=your-service-name  
sp.storage.service.host=Softprobe-storage-alb-1475960894.us-west-2.elb.amazonaws.com

Then configure Agent:

java -javaagent:</path/to/sp-agent.jar> -Dsp.config.path=/path/to/sp.agent.conf -jar your-application.jar

Set the Java options by using the JAVA_OPTS environment variable

You can deploy the Softprobe Agent on Tomcat by configuring the catalina.sh file or setting the JAVA_OPTS environment variable directly. Here’s an example of how to do this on Linux:

export Softprobe_STORAGE_SERVICE_HOST=Softprobe-storage-alb-1475960894.us-west-2.elb.amazonaws.com
export Softprobe_API_TOKEN=trip:712Vqq3/oa72aOrroBUsDYYrM+OQWQmqg4GAMHOWYhkCmswuWtIlP0CMhfKCPz6NypTloF4o9OTFlhTVRlLXmw==
export JAVA_TOOL_OPTIONS=&quot;-javaagent:&lt;Softprobe Agent JAR DIR&gt;/Softprobe/sp-agent.jar -Dsp.service.name=1a2caf7394756ca3 -Dsp.storage.service.host=$Softprobe_STORAGE_SERVICE_HOST -Dsp.api.token=$Softprobe_API_TOKEN&quot;

You can then run Tomcat as usual. The Softprobe Agent will be automatically injected into the JVM and run when Tomcat starts.

Once configured, Softprobe will automatically records all online traffic by default.

View recording details

After recording the real requests to your application, navigate to the Traffic section and click on the corresponding application to view the list of recordings. The recorded test cases are grouped by the API path. Expand the API path to see all the test cases recorded under that path

录制列表

Click on the Test Case Record ID to view the details of that test case.

录制详情

A complete recorded test case should include the following parts:

  • Servlet: The request and response messages of the main interface.
  • DynamicClass: If there are dynamic class invocations, their request and response messages are displayed.
  • Database, Redis: If there are third-party dependencies such as Redis and DB calls, their request and response messages are also presented."

By default, only recording test cases from the past 4 days are saved, and cases beyond this period will be automatically deleted.

On this page