This KB provides an example how to use BackendMarker
DX APM Java Agent 10.x
1. Create a HelloWorld Dummy application:
import java.util.*;
import java.text.*;
public class ProbedHelloWorld {
SimpleDateFormat sdf_ = new SimpleDateFormat();
Date date_ = new Date();
public ProbedHelloWorld() throws Exception {
Thread.sleep(1000);
Properties prop = System.getProperties();
prop.list(System.out);
while (true) {
callA(1000);
}
}
public void callA(long time) throws Exception {
date_.setTime(System.currentTimeMillis());
System.out.println(sdf_.format(date_) + " Still running...");
Thread.sleep(time);
}
public static void main(String args[]) throws Exception {
new ProbedHelloWorld();
}
}
2. Create a custom PBD: HW.pbd
TurnOn: MyCustomTracerGroup
SetFlag: MyCustomTracerGroup
IdentifyClassAs: ProbedHelloWorld MyCustomTracerGroup
IdentifyInheritedAs: ProbedHellowWorld MyCustomTracerGroup
TraceOneMethodOfClass: ProbedHelloWorld callA BackendMarker "{classname}|{method}"
3. Add HW.pbd to the IntroscopeAgent.profile:
introscope.autoprobe.directivesFile=default-typical-legacy.pbl,hotdeploy,HW.pbd
4. Restart the JVM to instrument the backend metric.
5. Review the result in the Metric Browser: