In APM is there a feature available for custom events similar how New Relic provide it?
Custom event collection is enabled by default in Java agent version 3.13.0 or higher. To send custom events, simply call the relevant API. For example:
Map<String, Object> eventAttributes = new HashMap<String, Object>(); NewRelic.getAgent().getInsights().recordCustomEvent("MyCustomEvent" eventAttributes);
What I mean is insert a code snippet where APM agent is listening and throw events directly to APM server. (not to a log file)
The subsequent error prompted by WildFly as follows:
10:51:36,575 ERROR [default task-1] [] [request] UT005023: Exception handling request to /eventprocessor/receive: org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: co/elastic/apm/api/ElasticApm
at [org.jboss.resteasy.resteasy-jaxrs@3.6.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:78)](mailto:org.jboss.resteasy.resteasy-jaxrs@3.6.1.Final//org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:78))
at [io.undertow.servlet@2.0.13.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)](mailto:io.undertow.servlet@2.0.13.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74))
at [org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)](mailto:org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78))
at [org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)](mailto:org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35))
at deployment.eventprocessor.war//com.sagag.services.event.controller.EventController.processEvent(EventController.java:25)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at [org.jboss.weld.core@3.0.5.Final//org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73)](mailto:org.jboss.weld.core@3.0.5.Final//org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73))
at deployment.eventprocessor.war//com.sagag.services.api.ReceiveApi$Proxy$_$$_WeldSubclass.storeEvent(Unknown Source)
... 50 more
Caused by: java.lang.ClassNotFoundException: co.elastic.apm.api.ElasticApm
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.jboss.modules.JDKSpecific.getSystemClass(JDKSpecific.java:183)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:395)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 88 more
Thanks Felix!
Can we expect a fast fix or has this bug low priority on your table?
We are very keen to get a fix soon, because we are evaluating the APM solution in order to replace the current environment.
Thanks
Note that the capture_headers option currently only supports recording application/x-www-form-urlencoded data (form parameters). Recording JSON data, for example, is not currently supported.
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.