feat(server-utils): Rewrite @opentelemetry/instrumentation-generic-pool to orchestrion#22240
Merged
mydea merged 2 commits intoJul 14, 2026
Conversation
…ool` to orchestrion Ports the generic-pool instrumentation from `InstrumentationBase` to an orchestrion diagnostics-channel listener. The transform injects the `orchestrion:generic-pool:acquire` channel into `acquire` (v3's promise-based class method and v2.4+'s callback-based prototype method), and `genericPoolChannelIntegration` subscribes to it. Registered in `channelIntegrations` so it 1:1 replaces the OTel `GenericPool` integration when orchestrion is enabled. Fixes #20751 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mydea
requested review from
JPeer264,
andreiborza and
isaacs
and removed request for
a team
July 14, 2026 08:24
mydea
marked this pull request as draft
July 14, 2026 08:25
Contributor
size-limit report 📦
|
JPeer264
removed their request for review
July 14, 2026 09:32
Member
|
removed myself as reviewer as it is in draft, feel free to readd me once this is good to go |
mydea
marked this pull request as ready for review
July 14, 2026 09:33
andreiborza
approved these changes
Jul 14, 2026
JPeer264
approved these changes
Jul 14, 2026
mydea
deleted the
francesconovy/js-2402-rewrite-opentelemetryinstrumentation-generic-pool-to
branch
July 14, 2026 12:35
49 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the
generic-poolinstrumentation from OTel'sInstrumentationBaseto an orchestrion diagnostics-channel listener.config/generic-pool.ts): injects theorchestrion:generic-pool:acquirechannel intoacquirefor two shapes — v3+class Pool { acquire(priority) }(promise,kind: 'Auto') and v2.4–v3Pool.prototype.acquire = function acquire(callback, priority)(callback,kind: 'Callback'). Both publish to the same channel.Version scope: v2.4+ and v3 are supported. v2.0–2.4 assigned an anonymous
acquireper pool instance inside thePoolfactory, which a static code transform has no named target to hook — the same boundary the original OTel instrumentation drew (it needed runtime factory-wrapping there). Under orchestrion those versions are not instrumented; the OTel integration still covers them when orchestrion is off.So this only covers 2.4+ which seems acceptable, the vast majority of usage according to npm is 3+ anyhow.
Fixes #20751
🤖 Generated with Claude Code