This folder contains agent plugins. A plugin most commonly is an instrumentation for a specific framework or technology. To add a new plugin, follow these steps:
- Create a new maven sub-module in
apm-agent-plugins - Add the module in the
<modules>section ofapm-agent-plugins/pom.xml - Add a dependency to your new module in
elastic-apm-agent/pom.xmlto make sure it is included in the agent jar - If you need to add any new runtime dependencies for the agent, make sure to properly configure shading in
elastic-apm-agent/pom.xml - Properly test your module with unit tests and consider adding integration tests.
See
CONTRIBUTING.mdfor more guidance. - Add information about the supported technology in
docs/intro.asciidoc - Add a line in
CHANGELOG.asciidoc
NOTE: when adding advices, make sure to add (suppress = Throwable.class)
to the net.bytebuddy.asm.Advice.OnMethodEnter and net.bytebuddy.asm.Advice.OnMethodExit annotations.
Search for the regex @.*OnMethod(Enter|Exit)(?!\(s) to find annotations with a missing suppress attribute.