dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

Add support for JDK 24

Open bdeneuter opened this issue 9 months ago • 11 comments

Library Name

No response

Library Version(s)

No response

Describe the feature you'd like

JDK 24 has been released but the latest DataDog Java agent doesn't support JDK 24 yet.

Is your feature request related to a problem?

No response

Describe alternatives you've considered

No response

Additional context

When our service starts, we get this error:

[dd.trace 2025-03-19 11:32:32:423 +0000] [main] ERROR datadog.trace.bootstrap.Agent - Throwable thrown while installing the Datadog Agent java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at datadog.trace.bootstrap.Agent.startDatadogAgent(Agent.java:654) at datadog.trace.bootstrap.Agent.start(Agent.java:300) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at datadog.trace.bootstrap.AgentBootstrap.agentmainImpl(AgentBootstrap.java:155) at datadog.trace.bootstrap.AgentBootstrap.agentmain(AgentBootstrap.java:72) at datadog.trace.bootstrap.AgentBootstrap.premain(AgentBootstrap.java:60) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:544) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:556) Caused by: java.lang.ExceptionInInitializerError at datadog.trace.agent.tooling.bytebuddy.outline.TypePoolFacade.registerAsSupplier(TypePoolFacade.java:19) at datadog.trace.agent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:108) at datadog.trace.agent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:79) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ... 12 more Caused by: java.lang.IllegalStateException: Failed to resolve the class file version of the current VM: This JVM's version string does not seem to be valid: 24 at net.bytebuddy.ClassFileVersion$VersionLocator$Unresolved.resolve(ClassFileVersion.java:676) at net.bytebuddy.ClassFileVersion.ofThisVm(ClassFileVersion.java:358) at datadog.trace.agent.tooling.bytebuddy.outline.OutlineTypeParser.parse(OutlineTypeParser.java:37) at datadog.trace.agent.tooling.bytebuddy.outline.TypeFactory.(TypeFactory.java:81) ... 16 more

bdeneuter avatar Mar 19 '25 10:03 bdeneuter

Looks like bytebuddy 1.15.4 and above would support 24, according to their README: https://github.com/raphw/byte-buddy

skye-pp avatar Mar 27 '25 09:03 skye-pp

Any updates?

andron3000 avatar Apr 07 '25 09:04 andron3000

Would also like an update. I see 1.48.0 contains Java 24 fixes on the profiler side: https://github.com/DataDog/dd-trace-java/releases/tag/v1.48.0

But using the latest (1.48.1) version still gives us the above error so the issue remains on the trace side.

same here any eta on the updating bytebuddy?

carlosmuller avatar Apr 15 '25 09:04 carlosmuller

Thanks for your patience! Bytebuddy will be updated to support JDK 24 in the next release. 🙂

sarahchen6 avatar Apr 22 '25 20:04 sarahchen6

would sure love to have a release for this. :)

internetstaff avatar May 02 '25 15:05 internetstaff

Yes, everyone is looking forward to this update. Do you have an ETA for the next release?

andron3000 avatar May 02 '25 16:05 andron3000

The 1.49.0 release with the byte-buddy upgrade is planned for Monday, May 5th!

sarahchen6 avatar May 02 '25 16:05 sarahchen6

The release has been slightly delayed, but we're working to get it out ASAP. New ETA is tomorrow, but it should be out in the next few days. Thanks for the patience :)

sarahchen6 avatar May 05 '25 13:05 sarahchen6

Released!

sarahchen6 avatar May 06 '25 17:05 sarahchen6

Uhuull! Working like a charm now ! Thanks!

carlosmuller avatar May 07 '25 10:05 carlosmuller