-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DD tracing is not working with virtual threads for a micronaut 4 application #6468
Comments
I have also noticed an issue with virtual threads. I have tried agent versions 1.26.1 and 1.27.0 to rule out the possibility of the regression coming from the agent upgrade. I also tested with both eclipse-temurin 21 and amazon-corretto 21, so it does not seem to be related to the java distribution. I am using Quarkus 3.6.4 with virtual thread enabled for endpoints. |
@Ajay1735 Thank you for your feedback. At this time, the Java tracer does not have support for virtual threads with Java 21. Because of this, the behavior you are observing is not unexpected. This is something we are looking to add support for in the near future. |
@nayeem-kamal I wish you could try to increase the priority on this one as virtual threads are a core feature of Java 21 and it's considered have major performance improvements on Java web applications. Also the major frameworks like Quarkus, Micronaut and Spring are already supporting it. |
is this framework agnostic or |
@jhchee I think so but have not tested w/Micronaut using those particular annotations. If you find that something does not work, please file an issue with Datadog support. Thanks very much. |
Have done basic testing with latest version of dd-agent, spans are getting created and tracing is working now. |
I can also confirm that spans are created in a Quarkus application with an endpoint annotated with |
I am very interested in passing traces across virtual threads for this. Could you provide some demo code? |
Problem
I have a Micronaut-based microservice on micronaut 4 and java 21. It is not sending traces to Datadog when used with virtual threads, but is able to send traces when used with event loops. Basically tracing is not working with changing the @ExecuteOn(TaskExecutors.IO) annotation to @ExecuteOn(TaskExecutors.BLOCKING) on controller.
I was trying to debug in local and using latest dd agent, I could see that the span is not created when the controller method is executed with virtual threads.
Used below block in my controller to fetch trace_id.
The text was updated successfully, but these errors were encountered: