Elastic APM Java agent on Java 25 with inferred spans

I’d like to understand how to get inferred spans working with Java 25. It’s working with Java 17.

Java agent version: 1.55.0
Java 25 (Azul)

Profiling configuration options | APM Java agent says: “In addition only Java 7 to Java 23 are supported.“ - is this still accurate?

I’m running the application like this:

FROM azul/zulu-openjdk-alpine:25

# Install APM agent and a dependency for profiling support (libstdc++)
ADD https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.55.0/elastic-apm-agent-1.55.0.jar /opt/elastic-apm-agent.jar
RUN chmod 0644 /opt/elastic-apm-agent.jar
RUN apk add --no-cache libstdc++

And then

java -javaagent:/opt/elastic-apm-agent.jar ...

For 17, this got me inferred spans. For 25, a warning is printed at startup:

WARNING: Install JVM debug symbols to improve profile accuracy

And I get no inferred spans.

Is this a feature that is still missing in Elastic APM’s Java agent for Java 25? Or is there a problem with the debug symbols in Azul Zulu 25?

Can I help with making it work with Java 25?

If you need inferred spans in Java 25, I recommend moving to our EDOT agent, where inferred spans are fully supported. The inferred spans in the APM agent are experimental, and are on an old version of asyncprofiler that won’t work beyond Java 23. We have no current plans to upgrade this as it is a significant effort on an experimental option and we have the EDOT agent where it is fully supported

1 Like

Very nice, thank you! I tried the EDOT agent and it’s working great. The only thing I couldn’t figure out so far is how to get the data for the metrics view back. “CPU usage”, “System memory usage”, GC details, etc. - the only thing I can see there is the thread count. I tried

OTEL_JMX_ENABLED=true
OTEL_JMX_TARGET_SYSTEM=jvm
OTEL_METRICS_EXPORTER=otlp

And I see related messages at startup like “Created UpDownCounter for jvm.memory.used” but nothing in the Metrics view in Kibana. Do you know what I’m missing?