# Errors are not logged/visible on APM UI

**URL:** <https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899>\
**Category:** APM\
**Tags:** java, ui\
**Created:** [July 13, 2020, 6:56am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899 "2020-07-13T06:56:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pankaj\_Navneet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_navneet/32/42419_2.png) [@Pankaj\_Navneet](https://discuss.elastic.co/u/Pankaj_Navneet)\
**Post date:** [July 13, 2020, 6:56am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/1 "2020-07-13T06:56:19Z")

</div>

Hi Team,

I have successfully use the APM for my java application. All the requests/tranasactions with status code 200, 404, etc are showing in the UI. But i am not seeing any traces of Error's in the UI (screenshot attached). Is there any additonal configuration required to make it work, so that application errors start populating on the UI ?

Please help.

 ![Screenshot 2020-07-13 at 12.24.31 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/8/189980bbc57142879ecee514f2ea23cf74dbfab4.png)

Below are the details of my setup.

**Kibana version** : 7.7.0

**Elasticsearch version** : 7.7.0

**APM Server version** : 7.7.0

**APM Agent language and version** : Java and apm-agent-attach-1.16.0-standalone.jar

**Browser version** : Chrome Version 83.0.4103.61

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

**Fresh install or upgraded from other version?** : Upgraded from 7.3.2

**Is there anything special in your setup?** No Load balancer used for APM server

Br  
Pankaj N

---

<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:** [July 13, 2020, 8:00am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/2 "2020-07-13T08:00:13Z")

</div>

The agent sends errors for specific events, for example when a traced method (related to a span/transaction) exits with an Exception, or a logging framework logging an error with an Exception.  
If there are no such events occurring within the traces shown using the same UI filters, then no errors will be shown.

---

<div class="post-metadata">

**Author:** ![Pankaj\_Navneet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_navneet/32/42419_2.png) [@Pankaj\_Navneet](https://discuss.elastic.co/u/Pankaj_Navneet)\
**Post date:** [July 14, 2020, 6:30am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/3 "2020-07-14T06:30:44Z")

</div>

Hi,

Thanks for your reply.

But, if I manually check the application log file, I have seen intermittent error messages in my application logs. So it must be shown on the APM UI which is not happening.

Is there a way, we can specify the error log files to be considered by the APM agent to trace for? So that agent can directly make a check for errors if any.

Br  
Pankaj N

---

<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:** [July 14, 2020, 11:43am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/4 "2020-07-14T11:43:55Z")

</div>

The APM agent is not collecting data from log files, it sends data based instrumentation of the application and the libraries it uses.  
What logging framework are you using in your application? What version?  
Try setting the [`log_level`](https://www.elastic.co/guide/en/apm/agent/java/current/config-logging.html#config-log-level) to `DEBUG` and see if you can find anything interesting that happens during a transaction that has an error.

---

<div class="post-metadata">

**Author:** ![Pankaj\_Navneet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_navneet/32/42419_2.png) [@Pankaj\_Navneet](https://discuss.elastic.co/u/Pankaj_Navneet)\
**Post date:** [July 17, 2020, 10:42am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/5 "2020-07-17T10:42:43Z")

</div>

Hi

Thanks for your reply.

I am using SLF4J and Logback logging framework in my application.

I set the log\_level as suggested (WARNING in my case) , but nothing happens this time as well. Below are the exception logs from my application, which i get intermittently but not showing on APM UI on Errors section.

```
    2020.07.17-11:15:18.965 WARNING: qtp1771331845-156: ContextHandler: Unable to check 
classloader of caller
java.lang.ClassNotFoundException: sun.reflect.Reflection
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)
    at org.eclipse.jetty.server.handler.ContextHandler$Context.getClassLoader(ContextHandler.java:2310)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1635)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.base/java.lang.Thread.run(Thread.java:834)

2020.07.17-11:29:30.632 WARNING: T014: CreateAssetForFeature.scanFeatures: 
AssetManagementExtension.process: AssetManagementService: master.20200717.11
2129.838[system]: failed on feature expression: manufactum:pim.market.showInShop__SAVE
java.lang.IllegalArgumentException: data object is not attached to a PersistenceManager: [I] Kolb I. 
  mage Import Image Similarity[65537-v1-c0-tcn2-ccn2]
        at com.company.support.model.DataObject.getPersistenceManagerEx(DataObject.java:333)
    at com.company.model.corpus.impl.Asset.createFeature(Asset.java:738)
    at com.company.model.corpus.impl.Asset.createOrGetFeature(Asset.java:749)
    at modules.asset.AssetManagementExtension.process(AssetManagementExtension.java:167)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.company.manager.scriptletmanager.ScriptletServiceImpl.invoke(ScriptletServiceImpl.java:304)
    at com.company.manager.scriptletmanager.ScriptletServiceImpl.invoke(ScriptletServiceImpl.java:241)
    at jdk.internal.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.company.support.service.ServiceHandlerSync.invoke(ServiceHandlerSync.java:164)
    at com.sun.proxy.$Proxy32.invoke(Unknown Source)
    at com.company.manager.assetmanager.AssetEvents.flags(AssetEvents.java:361)
    at com.company.manager.assetmanager.AssetManagement.flagsAndEvents(AssetManagement.java:3438)
    at com.company.manager.assetmanager.AssetManagement.update(AssetManagement.java:851)
    at com.company.manager.assetmanager.AssetManagement.update(AssetManagement.java:861)
    at com.company.manager.assetmanager.AssetManagement.update(AssetManagement.java:825)
    at com.company.manager.assetmanager.AssetManagementServiceImpl.update(AssetManagementServiceImpl.java:276)
    at jdk.internal.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.company.support.service.ServiceHandlerSync.invoke(ServiceHandlerSync.java:164)
    at com.sun.proxy.$Proxy31.update(Unknown Source)
    at modules.admin.feature_asset.Utility.updateModifiedAsset(Utility.java:155)
    at modules.admin.feature_asset.Utility.modifyAsset(Utility.java:122)
    at modules.admin.feature_asset.CreateAssetForFeature.existAssetForFeKey(CreateAssetForFeature.java:334)
    at modules.admin.feature_asset.CreateAssetForFeature.checkExistOrCreateFeatureAsset(CreateAssetForFeature.java:274)
    at modules.admin.feature_asset.CreateAssetForFeature.scanFeatures(CreateAssetForFeature.java:203)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)

2020.07.17-11:29:27.010 WARNING: T014: CreateAssetForFeature.scanFeatures: 
AssetManagementExtension.process: AssetManagementService: master.20200717.11
2129.838[system]: failed on feature expression: acc:kohls.eCom.dateThreshold
java.lang.IllegalArgumentException: data object is not attached to a PersistenceManager: (CC) Content-Type[55332-v1-c0-tcn2-ccn2]
    at com.company.support.model.DataObject.getPersistenceManagerEx(DataObject.java:333)
    at com.company.model.corpus.impl.Asset.createFeature(Asset.java:738)
    at com.company.model.corpus.impl.Asset.createOrGetFeature(Asset.java:749)
    at modules.asset.AssetManagementExtension.process(AssetManagementExtension.java:167)
    at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.company.manager.scriptletmanager.ScriptletServiceImpl.invoke(ScriptletServiceImpl.java:304)
    at com.company.manager.scriptletmanager.ScriptletServiceImpl.invoke(ScriptletServiceImpl.java:241)
    at jdk.internal.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.company.support.service.ServiceHandlerSync.invoke(ServiceHandlerSync.java:164)
    at com.sun.proxy.$Proxy32.invoke(Unknown Source)
    at com.company.manager.assetmanager.AssetEvents.flags(AssetEvents.java:361)
    at com.company.manager.assetmanager.AssetManagement.flagsAndEvents(AssetManagement.java:3438)
    at com.company.manager.assetmanager.AssetManagement.update(AssetManagement.java:851)
    at com.company.manager.assetmanager.AssetManagement.update(AssetManagement.java:861)
    at com.company.manager.assetmanager.AssetManagement.update(AssetManagement.java:825)
    at com.company.manager.assetmanager.AssetManagementServiceImpl.update(AssetManagementServiceImpl.java:276)
    at jdk.internal.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at com.company.support.service.ServiceHandlerSync.invoke(ServiceHandlerSync.java:164)
    at com.sun.proxy.$Proxy31.update(Unknown Source)

```

Br  
Pankaj N

---

<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:** [July 19, 2020, 8:18am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/6 "2020-07-19T08:18:13Z")

</div>

The `log_level` config I referred to is for the agent logs, not related to the application logs.

As I wrote above - the agent sends errors for exceptions thrown within traced flows and when events are logged at `ERROR` level.  
Neither seem to be the case here (these events are logged at `WARNING` level rather than `ERROR`), which is why the agent doesn't create errors for them.

---

<div class="post-metadata">

**Author:** ![Pankaj\_Navneet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_navneet/32/42419_2.png) [@Pankaj\_Navneet](https://discuss.elastic.co/u/Pankaj_Navneet)\
**Post date:** [July 23, 2020, 6:44am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/7 "2020-07-23T06:44:23Z")

</div>

Hi,

Can you please let me know how to configure the log\_level for APM agent, as I have used the "apm-agent-attach-1.16.0-standalone.jar" to directly attach to my application.

Br  
Pankaj N

---

<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:** [July 26, 2020, 7:12am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/8 "2020-07-26T07:12:00Z")

</div>

Try using the `--config` as described in [the documentation](https://www.elastic.co/guide/en/apm/agent/java/current/setup-attach-cli.html)

---

<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:** [August 16, 2020, 3:12am UTC](https://discuss.elastic.co/t/errors-are-not-logged-visible-on-apm-ui/240899/9 "2020-08-16T03:12:01Z")

</div>

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