Skip to content

ref(node): Streamline generic-pool - #21363

Merged
nicohrubec merged 6 commits into
developfrom
nh/streamline-generic-pool
Jun 9, 2026
Merged

ref(node): Streamline generic-pool#21363
nicohrubec merged 6 commits into
developfrom
nh/streamline-generic-pool

Conversation

@nicohrubec

@nicohrubecnicohrubec commented Jun 8, 2026

Copy link
Copy Markdown
Member

Streamlines the vendored @opentelemetry/instrumentation-generic-pool:

  • Extend test coverage: added a generic-pool v2 integration suite (genericPool-v2) alongside the existing v3 one, so both major versions are exercised. Ported unit tests from upstream.
  • Removed the eslint-disable and updated the formatting and types to make the linter happy.

This one has three supported version ranges with different instrumentation paths (2.0 - <2.4, 2.4 - <3.0, >3.0). The only path that is still heavily used is >3.0 based on npm downloads. In the future we can think about dropping v2 support, which would allow us to slim this instrumentation down quite a bit.

Closes#20727

nicohrubecand others added 4 commits June 8, 2026 13:44
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cases
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the unused PoolConstructor call signature and the _poolWrapper cast
(type the factory return instead). Behavior unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…l unit tests
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubec marked this pull request as ready for review June 9, 2026 10:16
@nicohrubec
nicohrubec requested a review from a team as a code ownerJune 9, 2026 10:16
@nicohrubec
nicohrubec requested review from JPeer264 and andreiborza and removed request for a teamJune 9, 2026 10:16
transaction: 'Test Transaction',
spans: expect.arrayContaining([
expect.objectContaining({
description: expect.stringMatching(/^generic-pool\.ac?quire/),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: is the ? necessary because they have a typo somewhere?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

this was just copy pasted from the other tests. this was necessary because in some old otel version there was a typo so we also had some special handling to deal with both potential span names (with and without typo). we can remove this now and simplify the assertions

}),

expect.objectContaining({
description: expect.stringMatching(/^generic-pool\.ac?quire/),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and here too

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

see above

The `generic-pool.aquire` typo only came from @opentelemetry/instrumentation-generic-pool <= 0.38.0;
the vendored instrumentation (0.61.0) always emits `generic-pool.acquire`, so simplify the origin
check and the test span matchers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.39 kB--
@sentry/browser - with treeshaking flags25.82 kB--
@sentry/browser (incl. Tracing)45.68 kB--
@sentry/browser (incl. Tracing + Span Streaming)47.92 kB--
@sentry/browser (incl. Tracing, Profiling)50.48 kB--
@sentry/browser (incl. Tracing, Replay)84.9 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags74.51 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)89.6 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)102.28 kB--
@sentry/browser (incl. Feedback)44.55 kB--
@sentry/browser (incl. sendFeedback)32.19 kB--
@sentry/browser (incl. FeedbackAsync)37.3 kB--
@sentry/browser (incl. Metrics)28.46 kB--
@sentry/browser (incl. Logs)28.69 kB--
@sentry/browser (incl. Metrics & Logs)29.39 kB--
@sentry/react29.18 kB--
@sentry/react (incl. Tracing)47.98 kB--
@sentry/vue32.4 kB--
@sentry/vue (incl. Tracing)47.57 kB--
@sentry/svelte27.41 kB--
CDN Bundle29.78 kB--
CDN Bundle (incl. Tracing)48.16 kB--
CDN Bundle (incl. Logs, Metrics)31.32 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)49.48 kB--
CDN Bundle (incl. Replay, Logs, Metrics)70.61 kB--
CDN Bundle (incl. Tracing, Replay)85.51 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)86.75 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)91.34 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.6 kB--
CDN Bundle - uncompressed88.46 kB--
CDN Bundle (incl. Tracing) - uncompressed145.67 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed93.17 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed149.65 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed217.99 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed264.54 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed268.5 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed278.24 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed282.19 kB--
@sentry/nextjs (client)50.43 kB--
@sentry/sveltekit (client)46.1 kB--
@sentry/core/server76.01 kB--
@sentry/core/browser63.14 kB--
@sentry/node-core61.72 kB-0.01%-2 B 🔽
@sentry/node130.4 kB-0.02%-21 B 🔽
@sentry/node - without tracing74.11 kB--
@sentry/aws-serverless86.29 kB--
@sentry/cloudflare (withSentry) - minified173.69 kB--
@sentry/cloudflare (withSentry)433.85 kB--

View base workflow run

@andreiborzaandreiborza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd keep v2 around, it's still downloaded quite a bit (~100k downloads in the last 7 days roughly).

@nicohrubec
nicohrubec merged commit 280e273 into developJun 9, 2026
271 of 272 checks passed
@nicohrubec
nicohrubec deleted the nh/streamline-generic-pool branch June 9, 2026 13:20
Sign up for freeto 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.

Streamline @opentelemetry/instrumentation-generic-pool

2 participants

@nicohrubec@andreiborza