Skip to content

Backport #3207 to 1.x-stable: Name Datadog::Core::Remote::Worker thread#3217

Merged
ivoanjo merged 3 commits into
1.x-stablefrom
ivoanjo/backport-name-core-remote-worker-thread
Oct 25, 2023
Merged

Backport #3207 to 1.x-stable: Name Datadog::Core::Remote::Worker thread#3217
ivoanjo merged 3 commits into
1.x-stablefrom
ivoanjo/backport-name-core-remote-worker-thread

Conversation

@ivoanjo

@ivoanjo ivoanjo commented Oct 24, 2023

Copy link
Copy Markdown
Member

This is a backport of #3207 to the 1.x-stable branch.

I merely rebased the commits on top of the other branch, with no other changes.

**What does this PR do?**

This PR sets the name of the thread started by the
`Datadog::Core::Remote::Worker` class (to be the name of the class).

This follows the same pattern we use for other dd-trace-rb internal
threads.

**Motivation:**

The profiler shows thread names in multiple places, and nameless
threads make it harder to see the data in several cases, so as much
as possible we want to avoid them.

One particular case is that for the timeline feature, we collapse
all dd-trace-rb threads by default, but that collapsing feature
relies on thread names, and so the remote worker thread was not
being properly collapsed (which is how I spotted it).

**Additional Notes:**

I've chosen to still include the Ruby 2.2/2.1 support because I plan
to backport this to the 1.x branch.

**How to test the change?**

This change includes test coverage. You can also enable the profiler
and check that when looking at thread names (right sidebar in
single and aggregated profiles; left side for timeline) you will
see the thread for this class properly named.
@ivoanjo
ivoanjo requested a review from a team as a code owner October 24, 2023 16:47
@github-actions github-actions Bot added the core Involves Datadog core libraries label Oct 24, 2023
@ivoanjo
ivoanjo changed the base branch from master to 1.x-stable October 25, 2023 11:45
@ivoanjo
ivoanjo merged commit d608f2a into 1.x-stable Oct 25, 2023
@ivoanjo
ivoanjo deleted the ivoanjo/backport-name-core-remote-worker-thread branch October 25, 2023 12:37
@marcotc marcotc added this to the 1.16.0 milestone Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants