getappmap / appmap-java

AppMap client agent for Java
Other
81 stars 15 forks source link

No appmaps recorded #166

Closed Trass3r closed 8 months ago

Trass3r commented 1 year ago

Tested Petclinic on Windows with GraalVM:

git clone https://github.com/spring-projects/spring-petclinic.git
cd spring-petclinic
npx @appland/appmap@latest install
mvnw package
java -Dappmap.event.valueSize=1024 -Dappmap.output.directory=target\appmap -javaagent:%USERPROFILE%\.m2\repository\com\appland\appmap-agent\1.15.6\appmap-agent-1.15.6.jar -jar target\spring-petclinic-3.0.0-SNAPSHOT.jar

mvn test does generate maps in target\appmap\junit but the "remote recording" command does not produce any output. -Dappmap.debug confirms that the AppMap Agent does get loaded and sample functions are getting hooked: logs

Trass3r commented 1 year ago

Ok I missed the second step in https://appmap.io/docs/recording-methods.html#remote-recording since everything just looks like links to documentation specific to the different tools. In that page the second step is missing altogether: https://appmap.io/docs/reference/appmap-java.html#remote-recording So that could be improved.

With those information recording works for the clinic example. In our real code it still didn't work, turns out because we used a custom server.servlet.context-path . I verified that it does work when using the API manually with the context-path prepended to /_appmap/record.