dd-trace-rb
dd-trace-rb copied to clipboard
Add support for `concurrent-ruby` `Concurrent::Promises::Future`
The concurrent-ruby
pattern for using Futures is now contained in Concurrent::Promises::Future
, and Concurrent::Future
has been deprecated (https://github.com/ruby-concurrency/concurrent-ruby#deprecated). It would be great if we could add support for the new style of Futures so that tracing context is propagated for Concurrent::Promises::Future
as well (https://github.com/DataDog/dd-trace-rb/blob/master/lib/ddtrace/contrib/concurrent_ruby/patcher.rb#L23).
Seems like a more than reasonable request, @benrbrook. I'll add it to our roadmap. Given how small the required changes seem to be, I expect that we'll be able to address it without much issue.
@marcotc This is a bit trickier than expected because of additional indirection in the new Promises::ChainPromise#on_resolvable
, but I got something running. I'll clean that up next week and push a PR.
Any news on this? This feature would be extremely helpful.
Good points! @lloeki created a PR for this in #1522 , I'll ping him :)
Thanks Ivo! Right now I'm on another goal until October starts, then I should have some time to finalise the PR Ivo mentioned.
This has been implemented in release 1.16.0
.