JAX-RS/Servlet API transactions disappear with application_packages parameter. How to get both?

Kibana version: 7.15

Elasticsearch version: 7.15

APM Server version: 7.15

APM Agent language and version: Java Agent 1.26

Original install method (e.g. download page, yum, deb, from source, etc.) and version: Java Agent installed using manual-way

Fresh install or upgraded from other version? Fresh

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Hey there, when I use the application_packages parameter to instrument the Java Agent, I can see specific transactions identified as Servlet API framework.
For instance, I use -Delastic.apm.application_packages=* since I would like to get scanned all the possible classes.
On the other hand, if I remove this parameter I cannot see the previous identified transaction type (Servlet API) while I can see new JAX-RS transactions(version 2.0.x).
So, what am I wrong? Is there a way to get both type?

Hi @rschirin ,

The application_packages configuration is optional and should only help to make instrumentation faster, which can also have an impact on application startup time.
What is surprising is that the Servlet instrumentation does not use this configuration, but the JAX-RS does.

  • does your JAX-RS implementation relies on Servlet API or not ?
  • can you set log_level=debug in the agent configuration and try to execute both types of transactions, ideally exactly one for each type to make debugging easier. Looking for log lines with endTransaction will help you know which transactions have been executed and if they match with what you expect.

At your first question I am not really sure I am able to answer, since I am not managing code :frowning:
About log_level, I set these values but I cannot find the output file :open_mouth:

-Delastic.apm.log_level=DEBUG -Delastic.apm.log_file=/etc/myapplication/elastic-apm.log

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.