Skip to content

JDK 24 support for Executors and StructuredTaskScope #13299

@bdeneuter

Description

@bdeneuter

Describe the bug

We are testing our code against JDK 24 EA which will be released next month.
We have 2 tests which test the javaagent instrumentation and which pass on JDK 23 but fail on JDK 24 EA:

  • one test checks the instrumentation from Executors.newVirtualThreadPerTaskExecutor
  • one test checks the instrumentation from StructuredTaskScope and structured concurrency

Steps to reproduce

Run a test on JDK 24 with the OTEL Java agent:

  • create a trace and span
  • start a Executors.newVirtualThreadPerTaskExecutor()
  • submit a Runnable on the Executor which test that the trace is the same

Same test for StructuredTaskScope

Expected behavior

We expect in the test that the trace is continued in the subtask or in the Runnable/Callable which is submitted to the Executor and StructuredTaskScope

Actual behavior

Fails with a NullPointerException because there is no trace available in the subtask

Javaagent or library instrumentation version

2.12.0

Environment

JDK: 24.ea.36-open
OS: OS X

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions