Hello,
I'm using an application with Spring boot 1.3.2.
I have attach the java aggent to the application process, but it don't seem to catch any Business Transaction.
Is there any special configuration needed to catch it, any Spring boot special configuration?
Thanks
Patricio Pereira
Hi, We strongly suspect that there might not be proper entry points for the Business Transactions to appear on controller UI.
Could you please send us the zipped agent logs located under <agent-install-dir>/logs to confirm the current situation.
Thanks
Rajesh
I got this working by following a similar set of instructions for New Relic from https://dzone.com/articles/including-java-agent
In summary, you need to include the agent with the Spring Boot application (I imported it into my local Maven repository as it isn't registered in Maven Central) and register the Premain-Class as the snippet from my pom.xml shows.
<profile> <id>appdynamics</id> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>com.appdynamics</groupId> <artifactId>appdynamics-agent</artifactId> <version>${appdynamics-version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> <executions> <execution> <phase>prepare-package</phase> <goals> <goal>unpack-dependencies</goal> </goals> <configuration> <includeArtifactIds>appdynamics-agent</includeArtifactIds> <outputDirectory>${project.build.outputDirectory}</outputDirectory> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.5</version> <configuration> <archive> <manifestEntries> <Premain-Class>com.singularity.ee.agent.appagent.AgentEntryPoint</Premain-Class> <Can-Redefine-Classes>true</Can-Redefine-Classes> <Can-Retransform-Classes>true</Can-Retransform-Classes> </manifestEntries> </archive> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration>
<mainClass>YOUR_SPRING_BOOT_MAIN_CLASS_IN_HERE</mainClass> </configuration> </plugin> </plugins> </build> </profile>
Once the JAR is built, add the javaagent in the usual way, it'll still pickup the configuration from the agent installation directory.
I'm encountering the same issue.
I did discover you have to put the javaagnet parameter prior to the calling out the runnable jar. Doing this got the javaagent to start and to log the following, but still there are no metrics getting sent to our appdynamics servers.
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - Using Java Agent Version [Server Agent v4.2.3.1 GA #12088 raa409c5461baacd62f5f549f6637ffed0530fcdd 49-4.2.3.next-build]
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - Running IBM Java Agent [No]
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - Java Agent Directory [D:\agent\ver4.2.3.1]
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - Java Agent AppAgent directory [D:\agent\ver4.2.3.1]
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - ####################################################################################
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - Java Agent Directory [D:\agent\ver4.2.3.1]
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - Java Agent AppAgent directory [D:\agent\ver4.2.3.1]
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - Using Java Agent Version [Server Agent v4.2.3.1 GA #12088 raa409c5461baacd62f5f549f6637ffed0530fcdd 49-4.2.3.next-build]
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[INFO]: JavaAgent - All agent classes have been pre-loaded
[Thread-0] Mon Jul 18 15:43:06 MDT 2016[DEBUG]: JavaAgent - Using Java Version [JAVA_18] for AppDynamics Java Agent
Running obfuscated agent
Started AppDynamics Java Agent Successfully.
[Thread-0] Mon Jul 18 15:43:08 MDT 2016[INFO]: JavaAgent - Started AppDynamics Java Agent Successfully.
I believe somehow for springboot to work with the appdyamics javaagent, the javaagent has to be embedded in the springboot jar during build time so it can listen on the embeded tomcat instance that spring boot launches.