# Configure APM for java based application

**URL:** <https://discuss.elastic.co/t/configure-apm-for-java-based-application/251723>\
**Category:** APM\
**Tags:** java\
**Created:** [October 12, 2020, 7:04am UTC](https://discuss.elastic.co/t/configure-apm-for-java-based-application/251723 "2020-10-12T07:04:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshi1](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Harshi1](https://discuss.elastic.co/u/Harshi1)\
**Post date:** [October 12, 2020, 7:04am UTC](https://discuss.elastic.co/t/configure-apm-for-java-based-application/251723/1 "2020-10-12T07:04:29Z")

</div>

**Kibana version** : 7.7.0

**Elasticsearch version** : 7.7.0

**APM Server version** : 7.7.0

**APM Agent language and version** : elastic-apm-agent-1.16.0.jar

**Browser version** : Chrome 84.0

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: rpm from download page

**Fresh install or upgraded from other version?** Fresh install

I have an application which is based on pure Java and is using below frameworks -

Asynchronous framework : executorservice

networking framework : httpurlconnection

logging framework : log4j

Also, OpenTracing is enabled and we are trying to configure APM by giving below options -

java -javaagent:/home/devops/apm/elastic-apm-agent-1.17.0.jar -Delastic.apm.server\_urls=http://10.131.111.32:8200 -Delastic.apm.service\_name=SIT\_TEST3 -Delastic.apm.hostname=Sit\_Test3 -Delastic.apm.enable\_log\_correlation=true -jar OptimaProxyServer-1.0.jar

But we are unable to get transactions in APM. We are only getting data related to JVM. Please let us know how to get transactions in APM for our application.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/e/3e2437f79aaa8f5634d06da9723f82a0d7f5ce62.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/d/dd40b06dfd9e7cb2ae0746bb74799bd36f5f42cd.png)

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [October 12, 2020, 7:55am UTC](https://discuss.elastic.co/t/configure-apm-for-java-based-application/251723/2 "2020-10-12T07:55:10Z")

</div>

Take a look at [this post](https://discuss.elastic.co/t/monitoring-undertow-using-elastic-apm-java-agent-is-not-giving-any-transaction-data/242455/13) which provides a general explanation on how OpenTracing integration works.  
Then you will need to adjust to your specific use case - see which OpenTracing library needs to be attached (in addition to the OP API) and learn how it requires you to setup a Tracer.

---

<div class="post-metadata">

**Author:** ![Harshi1](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@Harshi1](https://discuss.elastic.co/u/Harshi1)\
**Post date:** [October 12, 2020, 9:15am UTC](https://discuss.elastic.co/t/configure-apm-for-java-based-application/251723/3 "2020-10-12T09:15:47Z")

</div>

Hi Eyal,

I have gone through the post but we don't use Camel framework. So, camel tracing will not work , I believe.  
Is there any other framework based on my configurations, which I can use as a replacement for camel tracing.

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [October 12, 2020, 10:21am UTC](https://discuss.elastic.co/t/configure-apm-for-java-based-application/251723/4 "2020-10-12T10:21:43Z")

</div>

This link is mainly for you to see the explanation about how our OpenTracing integration works, regardless of the traced framework.  
Since you wrote:

> [@Harshi1](#):
>
> OpenTracing is enabled and we are trying to configure APM

I am assuming you already know what you what you want to get with OT. If not, you should look for OT libraries that are suitable for the frameworks you are using. If this is about using the OpenTracing API manually within your code, then follow [this](https://www.elastic.co/guide/en/apm/agent/java/current/opentracing-bridge.html#getting-started), and you may also look into using our [public API](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html) instead.

---

<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 2, 2020, 6:21am UTC](https://discuss.elastic.co/t/configure-apm-for-java-based-application/251723/5 "2020-11-02T06:21:46Z")

</div>

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