Kibana version:
7.7.0
Elasticsearch version:
7.7.0
APM Server version:
7.7.0
APM Agent language and version:
java
1.16.0
Browser version:
Chrome
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
Maven
Fresh install or upgraded from other version?
Fresh
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I setup basic Jetty server with AbstractHandler and started a simple server on port 9001. APM only tracking main class JVM and transactions/API are not tracked.
Steps to reproduce:
- Basic HTTP Jetty Server
- Connect APM to Process/Java
- API not tracked
Errors in browser console (if relevant):
No Error
** Jetty Server
package jetty;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.AbstractHandler;
import co.elastic.apm.attach.ElasticApmAttacher;
public class Application extends AbstractHandler {
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("text/html;charset=utf-8");
response.setStatus(HttpServletResponse.SC_OK);
baseRequest.setHandled(true);
response.getWriter().println("<h1>Hello World</h1>");
}
public static void main(String[] args) throws Exception {
ElasticApmAttacher.attach();
Server server1 = new Server(9001);
server1.setHandler(new Application());
server1.start();
server1.join();
}
}
Provide logs and/or server output (if relevant):
2020-05-21 14:55:00.656:INFO::main: Logging initialized @450ms to org.eclipse.jetty.util.log.StdErrLog
2020-05-21 14:55:00.779:INFO:oejs.Server:main: jetty-9.4.28.v20200408; built: 2020-04-08T17:49:39.557Z; git: ab228fde9e55e9164c738d7fa121f8ac5acd51c9; jvm 1.8.0_232-b09
2020-05-21 14:55:00.839:INFO:oejs.AbstractConnector:main: Started ServerConnector@379619aa{HTTP/1.1, (http/1.1)}{0.0.0.0:9001}
2020-05-21 14:55:00.847:INFO:oejs.Server:main: Started @654ms
2020-05-21 14:55:37.408 [Attach Listener] INFO co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean
2020-05-21 14:55:37.720 [elastic-apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: { "build_date": "2020-05-12T00:04:54Z", "build_sha": "64e91c95329991c36b16ff94fd34ea75230c06c2", "version": "7.7.0"}
2020-05-21 14:55:37.754 [Attach Listener] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.16.0 as Test-Jetty2 on Java 1.8.0_232 (AdoptOpenJDK) Mac OS X 10.15.4
2020-05-21 14:55:37.769 [Attach Listener] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
2020-05-21 14:55:37.918 [elastic-apm-remote-config-poller] INFO co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Received new configuration from APM Server: {}