# Trace\_methods not tracing methods for Java application deployed in weblogic

**URL:** <https://discuss.elastic.co/t/trace-methods-not-tracing-methods-for-java-application-deployed-in-weblogic/234777>\
**Category:** APM\
**Tags:** java\
**Created:** [May 28, 2020, 4:04pm UTC](https://discuss.elastic.co/t/trace-methods-not-tracing-methods-for-java-application-deployed-in-weblogic/234777 "2020-05-28T16:04:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vineet0211](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineet0211/32/69306_2.png) [@Vineet0211](https://discuss.elastic.co/u/Vineet0211)\
**Post date:** [May 28, 2020, 4:04pm UTC](https://discuss.elastic.co/t/trace-methods-not-tracing-methods-for-java-application-deployed-in-weblogic/234777/1 "2020-05-28T16:04:37Z")

</div>

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text 🙂

**Kibana version** : 7.6.2

**Elasticsearch version** : 7.6.2

**APM Server version** : 7.6.2

**APM Agent language and version** :

**Browser version** : Chrome

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

**Fresh install or upgraded from other version?**  
Fresh install  
**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.  
No  
**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

**Steps to reproduce** :

1. configure Elasticsearch, Kibana, APM-Server and apm-agent(in weblogic)
2. configure weblogic startup with java below options  
`export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.server_urls=http://10.XX.XX.XX:8200" export JAVA_OPTIONS="$JAVA_OPTIONS -javaagent:/users/gen/XXX/JEE/XXX/XXX/XXX/lib/elastic-apm-agent.jar" export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.service_name=CRM_Services" export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.instrument=true" export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.environment=Local_Env" export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.capture_body=true" export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.application_packages=com.clxxy,com.axxxxs,axxxxs.bpm,com.cxxhd,axxxxs.uxxsx,com.cxxglx,cxx.crmimpl" export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.trace_methods=com.clxxxy.*,com.axxxs.*,axxxxs.bpm.*,com.cxxxd.*,axxxxs.uxxx.*,com.cxxxlx.*,com.cxxxl.*" export JAVA_OPTIONS="$JAVA_OPTIONS -Delastic.apm.enable_log_correlation=true"`

**Errors in browser console (if relevant)**:

**Provide logs and/or server output (if relevant)**:

Only getting below 2 entries:

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/e/6/e696b552a4fd0a1af1e976910e22e65c2a956d1c.jpeg)

---

<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:** [June 1, 2020, 6:35am UTC](https://discuss.elastic.co/t/trace-methods-not-tracing-methods-for-java-application-deployed-in-weblogic/234777/2 "2020-06-01T06:35:50Z")

</div>

Welcome to the forum Vineet!

Your configuration seems correct. Please set log level to `debug` and see if you find anything interesting.

Regardless, an important advice: it seems you are attempting to capture all methods of entire packages using the `trace_methods` configuration. You should be aware that while each traced method execution adds very little to the agent overhead (and results in one indexed document), such instrumentation may increase overhead greatly. It is enough to instrument one method that is executed very frequently to cause this. Moreover, your traces may become not-so-useable if they are too big, which is why we [limit the number of spans per transaction](https://www.elastic.co/guide/en/apm/agent/java/current/config-core.html#config-transaction-max-spans) by default.

I suggest you take a look at our [method monitoring guide](https://www.elastic.co/guide/en/apm/agent/java/current/java-method-monitoring.html), and specifically the new [sampling profiling feature](https://www.elastic.co/guide/en/apm/agent/java/current/method-sampling-based.html). Since it is still experimental, it is off by default and can be switched on through the [`profiling_inferred_spans_enabled`](https://www.elastic.co/guide/en/apm/agent/java/current/config-profiling.html#config-profiling-inferred-spans-enabled) config.

---

<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:** [June 22, 2020, 2:35am UTC](https://discuss.elastic.co/t/trace-methods-not-tracing-methods-for-java-application-deployed-in-weblogic/234777/3 "2020-06-22T02:35:56Z")

</div>

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