How to use apm agent for hybris application?

(Ashutosh Maheshwari) #1

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.

https://www.elastic.co/guide/en/apm/agent/java/current/application-server-setup.html

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:

wrapper.java.additional.xx=-javaagent:/path/to/newrelic/newrelic.jar

and then start the agent using the command provided by them and then start the hybris application.

Enabled JAVAAPM agent to my app in docker but i cant see it in kibana under apm services
(Felix Barnsteiner) #2

Hi and thanks for your interest in Elastic APM.

I have no experience with Hybris, but have you tried to set up the APM Java agent in the same way?

Best,
Felix

(Felix Barnsteiner) #3

Hi,

Did it work for you?

Best,
Felix

(Ashutosh Maheshwari) #4

Hello Felix,

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

Please help me out here. I want this to work.

Regards,
Ash.

(Ashutosh Maheshwari) #5

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:

Need to investigate how to resolve this issue.

Regards,
Ash.

(Felix Barnsteiner) #6

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.

Which server are you running on? Is it Tomcat?

1 Like
(Ashutosh Maheshwari) #7

Hello Felix,

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.

Regards,
Ash.

(Felix Barnsteiner) #8

I do agree that this can be very confusing and we have actually even fixed that. It will be released in version 7.0.0. See also https://github.com/elastic/kibana/issues/27558

1 Like
(system) closed #9

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