Skip to content

[BUG]: Missing traces from custom Concurrent::Promises #4589

@wesleyjellis

Description

@wesleyjellis

Tracer Version(s)

2.9.0

Ruby Version(s)

ruby 3.3.7 (2025-01-15 revision be31f993d7) +YJIT [x86_64-linux]

Relevent Library and Version(s)

No response

Bug Report

When you create your own Promise class/module, let's say to override the default executor, any traces / metrics that are generated inside promises (which are in their own threads) are lost. Example of this is in the concurrent-ruby docs: https://ruby-concurrency.github.io/concurrent-ruby/master/file.promises.out.html

I think this is because PromisesFuturePatch is only applied to Concurrent::Promises module here:

This is easy enough to work around by either applying the patch manually, or not making your own Concurrent::Promises

Reproduction Code

No response

Configuration Block

No response

Error Logs

No response

Operating System

No response

How does Datadog help you?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugInvolves a bugcommunityWas opened by a community member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions