Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow conditional registration of transformers for when JBoss and Tomcat plugins are both enabled #2178

Closed
Xylus opened this issue Oct 20, 2016 · 0 comments · Fixed by #2179
Assignees
Milestone

Comments

@Xylus
Copy link
Contributor

Xylus commented Oct 20, 2016

JBoss and Tomcat plugins both add transformers for org.apache.catalina.core.StandardHostValve.
When both plugins are enabled, the agent throws an exception, complaining that there are more than 1 transformer for the class and it does not know which one to use for instrumentation.

The best solution would be to have the agent "automagically" figure out which transformer to use when the class is loaded, but this is currently out of reach.
Instead, we'll simply (and crudely) add conditional checks that does the following:

  • If the application is a Tomcat application, or a SpringBoot application (launched by their respective main-classes), add Tomcat transformers.
  • If the application is a JBoss application, add JBoss transformers.

There should also be an option that disables these checks completely in pinpoint.config - profiler.tomcat.conditional.transform, profiler.jboss.conditional.transform.

One drawback to the solution above would be that standalone applications that run embedded Tomcat (or SpringBoot applications running Tomcat launched from an IDE) will not automatically register Tomcat transformers for their relevant classes. For such cases, profiler.tomcat.conditional.transform should be set to false.

@Xylus Xylus added this to the 1.6.0 milestone Oct 20, 2016
@Xylus Xylus self-assigned this Oct 20, 2016
Xylus added a commit to Xylus/pinpoint that referenced this issue Oct 20, 2016
Tomcat plugin checks if the application was launched via Tomcat's Bootstrap, or one of SpringBoot's many launchers.
JBoss plugin checks if the application was launched via JBoss' Main.
Configuration option is added to disable this check entirely.
Xylus added a commit to Xylus/pinpoint that referenced this issue Oct 20, 2016
Tomcat plugin checks if the application was launched via Tomcat's Bootstrap, or one of SpringBoot's many launchers.
JBoss plugin checks if the application was launched via JBoss' Main.
Configuration option is added to disable this check entirely.
emeroad pushed a commit that referenced this issue Oct 20, 2016
Tomcat plugin checks if the application was launched via Tomcat's Bootstrap, or one of SpringBoot's many launchers.
JBoss plugin checks if the application was launched via JBoss' Main.
Configuration option is added to disable this check entirely.
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant