As we know hybris is a complex application, it is difficult to implement apm agent on it. You should update your documentation for hybris application too.
Setting up newrelic is very easy, we just have to download the jar and add a property in wrapper.conf file, which looks like this:
I have started setting up APM on hybris application, but I see no agents in the apm console, while the logs says successfully connected to APM Server.
See my APM console is blank:
Check out the logs, which has warnings but no errors:
INFO | jvm 1 | main | 2019/02/13 11:17:08.936 | uintx HeapMaximumCompactionInterval = 20 {product}
INFO | jvm 1 | main | 2019/02/13 11:17:08.942 | intx ValueMapMaxLoopSize = 8 {C1 product}
INFO | jvm 1 | main | 2019/02/13 11:17:17.965 | 2019-02-13 11:17:17.913 [main] INFO co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 1:name=systemd:/user/1023.user/1.session
INFO | jvm 1 | main | 2019/02/13 11:17:18.166 | 2019-02-13 11:17:18.085 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.3.0 as test-scripting1 on Java 1.8.0_161 (Oracle Corporation) Linux 4.16.0-999-lowlatency
INFO | jvm 1 | main | 2019/02/13 11:17:18.166 | 2019-02-13 11:17:18.085 [main] WARN co.elastic.apm.agent.configuration.StartupInfo - Detected usage of an old configuration key: 'server_url'. Please use 'server_urls' instead.
INFO | jvm 1 | main | 2019/02/13 11:17:18.166 | 2019-02-13 11:17:18.086 [main] WARN co.elastic.apm.agent.configuration.StartupInfo - To enable all features and to increase startup times, please configure application_packages
INFO | jvm 1 | main | 2019/02/13 11:17:18.566 | 2019-02-13 11:17:18.553 [apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: {"ok":{"build_date":"2018-12-06T18:49:16Z","build_sha":"c784db0b58d2f70db7582dc80850e08a32ba45e5","version":"6.5.3"}}
INFO | jvm 1 | main | 2019/02/13 11:17:27.633 | uintx HeapMaximumCompactionInterval = 20 {product}
INFO | jvm 1 | main | 2019/02/13 11:17:27.639 | intx ValueMapMaxLoopSize = 8 {C1 product}
INFO | jvm 1 | main | 2019/02/13 11:17:36.759 | 2019-02-13 11:17:36.703 [main] INFO co.elastic.apm.agent.impl.payload.SystemInfo - Could not parse container ID from '/proc/self/cgroup' line: 1:name=systemd:/
INFO | jvm 1 | main | 2019/02/13 11:17:36.959 | 2019-02-13 11:17:36.880 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.3.0 as test-scripting1 on Java 1.8.0_161 (Oracle Corporation) Linux 4.16.0-999-lowlatency
INFO | jvm 1 | main | 2019/02/13 11:17:36.959 | 2019-02-13 11:17:36.880 [main] WARN co.elastic.apm.agent.configuration.StartupInfo - Detected usage of an old configuration key: 'server_url'. Please use 'server_urls' instead.
INFO | jvm 1 | main | 2019/02/13 11:17:36.959 | 2019-02-13 11:17:36.880 [main] WARN co.elastic.apm.agent.configuration.StartupInfo - To enable all features and to increase startup times, please configure application_packages
INFO | jvm 1 | main | 2019/02/13 11:17:37.360 | 2019-02-13 11:17:37.325 [apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: {"ok":{"build_date":"2018-12-06T18:49:16Z","build_sha":"c784db0b58d2f70db7582dc80850e08a32ba45e5","version":"6.5.3"}}
INFO | jvm 1 | main | 2019/02/13 11:17:58.718 | 2019-02-13 11:17:58.671 [localhost-startStop-1] WARN co.elastic.apm.agent.bci.bytebuddy.ErrorLoggingListener - com.sap.db.jdbc.ConnectionSapDBFinalize uses an unsupported class file version (pre Java 5) and can't be instrumented. Consider updating to a newer version of that library.
INFO | jvm 1 | main | 2019/02/13 11:19:09.210 | 11:19:09 AM | INFO | [hybris Application context - master] de.hybris.platform.commerceservices.spring.config.MapMergeDirectiveBeanPostProcessor@6466413c Finished Processing [0] directives in 6ms | localhost-startStop-1 | MapMergeDirectiveBeanPostProcessor
INFO | jvm 1 | main | 2019/02/13 11:20:58.872 | 11:20:58 AM | INFO | [Root WebApplicationContext - ] de.hybris.platform.commerceservices.spring.config.MapMergeDirectiveBeanPostProcessor@4d903380 Finished Processing [0] directives in 0ms | localhost-startStop-1 | MapMergeDirectiveBeanPostProcessor
So, on my further investigation, When we click on discover in kibana and switch to apm-* index, we can see that data is coming. So, the issue is with APM Server which is unable to display it.
Here is a screenshot:
It seems like the agent is running and that it's sending metrics. But it did not record any transactions. The services list only shows services when there have been transactions recorded in the selected timeframe. Please make sure you execute some requests. The application should then show up.
I was able to make it run, after making some random request on the URL, but you should consider adding it in the APM console if the configuration is right, even if there are no request.
As this was a test server no one uses it.
My hybris application is running on tomcat using a wrapper.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.