Monitoring Undertow using Elastic APM java agent is not giving any transaction data

No need for that, should be removed.

Elastic Java agent integration with OpenTracing includes three components:

  1. The agent itself, which is installed/attached and configured (including server_urls) just like you would use it standalone. The agent is responsible for the tracing heavy lifting - it collects metrics, configurations, event etc. and communicates with the APM server. All it misses in your case is a specific instrumentation for Undertow or Fuse, which is why we use OpenTracing.
  2. An OpenTracing library that fills the gap of instrumenting what the agent doesn't and creating events accordingly. The events are created through the OpenTracing API if you provide an implementation for the API (see #3). For this, you can try out the camel-opentracing component (notice the setTracer API that allows you to set a specific tracer implementation, the Elastic tracer from the bridge in this case).
  3. The OpenTracing bridge jar. Note that this jar only bridges between the OpenTracing library and the Elastic Java agent. It is implementing the OpenTracing API, but it is doing nothing if the agent is not attached as well. You need to add this jar to your application dependencies, alongside the library (from #2) and you need to initialize the tracer, as documented.

I hope this helps.