Skip to content

Document threads.preload config option#561

Draft
kriszyp wants to merge 2 commits into
mainfrom
kris/threads-preload-docs
Draft

Document threads.preload config option#561
kriszyp wants to merge 2 commits into
mainfrom
kris/threads-preload-docs

Conversation

@kriszyp

@kriszyp kriszyp commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Documents the new threads.preload configuration option in the config reference.

threads.preload loads a module (or list of modules) via Node's --require before any Harper or application module on each worker thread — the earliest point in a worker's lifetime — so instrumentation/APM agents like dd-trace can instrument subsequent module loads. Bare specifiers resolve against installed components' node_modules; absolute paths are also accepted.

Companion PR

Core implementation: HarperFast/harper#1569.

Notes for the reviewer

  • Tagged <VersionBadge version="v5.2.0" /> on the assumption this ships in core v5.2.0 (main is currently on 5.1.15). Please adjust the version if it lands in a different release.

Generated with assistance from Claude (Opus 4.8); reviewed and committed by Kris.

Adds threads.preload to the configuration reference — preloads modules (e.g.
dd-trace) via --require on worker threads before any Harper or app module, for
APM/instrumentation agents. Ships in harper v5.2.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for the new preload configuration option under threads in reference/configuration/options.md. The reviewer suggested restructuring the YAML example to avoid duplicate keys within the same block, which could lead to invalid YAML if uncommented.

Comment thread reference/configuration/options.md Outdated
@github-actions github-actions Bot temporarily deployed to pr-561 July 2, 2026 13:23 Inactive
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-561

This preview will update automatically when you push new commits.

Avoids a duplicate 'preload' key in one block (would be invalid YAML if the
commented lines were uncommented). Addresses docs review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-561

This preview will update automatically when you push new commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant