Skip to content

Support Node.js profiling in worker threads #26251

Open

Description

@nicohrubec

Profiling is currently disabled inside Node.js worker threads. #20040 introduced this guard after #20029 demonstrated heap corruption and crashes when using nodeProfilingIntegration() in workers.

Add safe support for profiling code executing inside worker threads, including continuous profiling with both manual and trace lifecycles. Address the underlying native profiler issue before removing the guard.

Expected behavior:

  • Workers can independently collect and send profiles.
  • Profiles identify the originating worker and correlate with its traces.
  • Profiling remains stable during concurrent worker activity, garbage collection, and worker shutdown.

Related: #20029, #20040.

Activity

  1. linear-code commented on Nov 10, 2026

    @linear-code
  2. drona-gyawali commented on Nov 16, 2026

    @drona-gyawali

    Hi @nicohrubec , I’d love to work on this, If it’s available for external contributors, I can share my approach. If it’s already being handled internally, no worries, thanks for the detailed write-up either way.

  3. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Nov 16, 2026
  4. nicohrubec commented on Nov 16, 2026

    @nicohrubec
    MemberAuthor

    Hey @drona-gyawali , thanks for offering. This ones a bit tricky so we'll tackle this ourselves.

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Nov 16, 2026
  6. self-assigned this
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions