Errors are not logged/visible on APM UI

,

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.

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

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.

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

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 to DEBUG and see if you can find anything interesting that happens during a transaction that has an error.

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

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.

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

Try using the --config as described in the documentation

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