- 1 Minute to read
- Print
- DarkLight
- PDF
Support for Java Background Services
- 1 Minute to read
- Print
- DarkLight
- PDF
Retrace supports tracking the performance of non-web applications. Web applications have very defined transactions based on when a web request starts and ends. For background services, you must make small modifications to your code to define your transactions.
Retrace can be used with Java based Windows Services and Linux daemon services.
Pre-Requisites
- Application must be setup with our custom configuration or be using one our supported Non-WebApp frameworks (Quartz, Spring Batch, Akka). Please follow these steps here first: Configure Custom Profiling for Java.
- Application must be setup as a Linux Service.
- Linux Agent Installed
Example using annotations:
import com.stackify.apm.Trace;
@Trace
public class ClassToBeInstrumented
{
@Trace(start = true)
public void methodToStartNewTrace()
{
//Your code here
}
}
Update the application startup script to pass in the javaagent option:
-javaagent:/usr/local/stackify/stackify-java-apm/stackify-java-apm.jar
- Once traces come in - user will need to go to Other Apps
- Click Add from existing
- Find their service name and click Add.
Stats should start flowing in at this point. Keep in mind it may take approx. 5 minutes for data to propagate in the Retrace Portal.