# JAX-RS/Servlet API transactions disappear with application\_packages parameter. How to get both?

**URL:** <https://discuss.elastic.co/t/jax-rs-servlet-api-transactions-disappear-with-application-packages-parameter-how-to-get-both/287164>\
**Category:** APM\
**Tags:** docker, java\
**Created:** [October 20, 2021, 8:28am UTC](https://discuss.elastic.co/t/jax-rs-servlet-api-transactions-disappear-with-application-packages-parameter-how-to-get-both/287164 "2021-10-20T08:28:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [October 20, 2021, 8:28am UTC](https://discuss.elastic.co/t/jax-rs-servlet-api-transactions-disappear-with-application-packages-parameter-how-to-get-both/287164/1 "2021-10-20T08:28:46Z")

</div>

**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?

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [October 20, 2021, 12:26pm UTC](https://discuss.elastic.co/t/jax-rs-servlet-api-transactions-disappear-with-application-packages-parameter-how-to-get-both/287164/2 "2021-10-20T12:26:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [October 22, 2021, 3:51pm UTC](https://discuss.elastic.co/t/jax-rs-servlet-api-transactions-disappear-with-application-packages-parameter-how-to-get-both/287164/3 "2021-10-22T15:51:23Z")

</div>

At your first question I am not really sure I am able to answer, since I am not managing code ☹  
About log\_level, I set these values but I cannot find the output file 😮

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

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 12, 2021, 11:52am UTC](https://discuss.elastic.co/t/jax-rs-servlet-api-transactions-disappear-with-application-packages-parameter-how-to-get-both/287164/4 "2021-11-12T11:52:25Z")

</div>

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