Skip to content

ref(nestjs): extract shared span helpers - #22175

Merged
isaacs merged 1 commit into
developfrom
isaacs/nestjs-extract-helpers
Jul 13, 2026
Merged

ref(nestjs): extract shared span helpers#22175
isaacs merged 1 commit into
developfrom
isaacs/nestjs-extract-helpers

Conversation

@isaacs

Copy link
Copy Markdown
Member

Pull the span-emitting/patching logic out of the OTel InstrumentationBase classes into wrap-components, wrap-handlers, and wrap-route so it can be reused by the diagnostics-channel integration.

Refactor only. There is still only the OTel implementation, which still emits the same spans as before. However, this will be needed when the next implementation is added.

@isaacs
isaacs requested a review from a team as a code ownerJuly 10, 2026 03:34
@isaacs
isaacs requested review from chargome, mydea and nicohrubec and removed request for a teamJuly 10, 2026 03:34
@github-actions

github-actionsBot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.61 kB--
@sentry/browser - with treeshaking flags26.05 kB--
@sentry/browser (incl. Tracing)46.36 kB--
@sentry/browser (incl. Tracing + Span Streaming)48.16 kB--
@sentry/browser (incl. Tracing, Profiling)51.15 kB--
@sentry/browser (incl. Tracing, Replay)85.63 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags75.27 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)90.34 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)103 kB--
@sentry/browser (incl. Feedback)44.79 kB--
@sentry/browser (incl. sendFeedback)32.41 kB--
@sentry/browser (incl. FeedbackAsync)37.53 kB--
@sentry/browser (incl. Metrics)28.69 kB--
@sentry/browser (incl. Logs)28.93 kB--
@sentry/browser (incl. Metrics & Logs)29.62 kB--
@sentry/react29.4 kB--
@sentry/react (incl. Tracing)48.63 kB--
@sentry/vue33.04 kB--
@sentry/vue (incl. Tracing)48.34 kB--
@sentry/svelte27.63 kB--
CDN Bundle30.01 kB--
CDN Bundle (incl. Tracing)48.34 kB--
CDN Bundle (incl. Logs, Metrics)31.59 kB--
CDN Bundle (incl. Tracing, Logs, Metrics)49.65 kB--
CDN Bundle (incl. Replay, Logs, Metrics)70.82 kB--
CDN Bundle (incl. Tracing, Replay)85.84 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)87.16 kB--
CDN Bundle (incl. Tracing, Replay, Feedback)91.65 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)92.92 kB--
CDN Bundle - uncompressed89.37 kB--
CDN Bundle (incl. Tracing) - uncompressed146.12 kB--
CDN Bundle (incl. Logs, Metrics) - uncompressed94.07 kB--
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed150.09 kB--
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed218.8 kB--
CDN Bundle (incl. Tracing, Replay) - uncompressed265.32 kB--
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed269.28 kB--
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed279.02 kB--
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed282.97 kB--
@sentry/nextjs (client)51.18 kB--
@sentry/sveltekit (client)46.81 kB--
@sentry/core/server78.42 kB--
@sentry/core/browser64.77 kB--
@sentry/node-core62.73 kB--
@sentry/node125.09 kB--
@sentry/node (incl. diagnostics channel injection)139.35 kB--
@sentry/node/import (ESM hook with diagnostics-channel injection)69.96 kB--
@sentry/node/light50.73 kB-0.01%-2 B 🔽
@sentry/node - without tracing74.1 kB--
@sentry/aws-serverless83.33 kB+0.01%+2 B 🔺
@sentry/cloudflare (withSentry) - minified181.58 kB--
@sentry/cloudflare (withSentry)449.49 kB--

View base workflow run

@nicohrubecnicohrubec 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.

overall lgtm, I just have two small questions/remarks

Comment threadpackages/nestjs/src/integrations/helpers.ts
Comment threadpackages/nestjs/src/integrations/sentry-nest-bullmq-instrumentation.ts Outdated
@isaacs
isaacs requested a review from a team as a code ownerJuly 10, 2026 14:15
@isaacs
isaacs requested review from JPeer264 and andreiborza and removed request for a teamJuly 10, 2026 14:15
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from 1eb7633 to fa0de85CompareJuly 10, 2026 14:16
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from fa0de85 to dd92103CompareJuly 10, 2026 16:30
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from dd92103 to b74dcbdCompareJuly 10, 2026 16:53
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from b74dcbd to 9315716CompareJuly 10, 2026 17:16
Comment threadpackages/nestjs/src/integrations/wrap-handlers.ts
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from 9315716 to 28b5141CompareJuly 10, 2026 17:36
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from 28b5141 to 915478fCompareJuly 13, 2026 00:42
Comment threadpackages/nestjs/src/integrations/wrap-handlers.ts
Comment threadpackages/nestjs/src/integrations/wrap-handlers.ts Outdated
Comment threadpackages/nestjs/src/integrations/wrap-handlers.ts
Comment threadpackages/nestjs/src/integrations/wrap-components.ts

@JPeer264JPeer264 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.

LGTM.

Just this one clanker concern would be nice to validate

Comment threadpackages/nestjs/src/integrations/wrap-route.ts Outdated
Comment threadpackages/nestjs/src/integrations/wrap-components.ts
Comment threadpackages/nestjs/src/integrations/sentry-nest-instrumentation.ts Outdated
Base automatically changed from isaacs/node-move-default-integration-swap to developJuly 13, 2026 14:08
@isaacs
isaacs requested a review from a team as a code ownerJuly 13, 2026 14:08
@isaacs
isaacs requested review from msonnb and removed request for a teamJuly 13, 2026 14:08
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from 915478f to b49e065CompareJuly 13, 2026 14:08
Comment threadpackages/nestjs/src/integrations/wrap-route.ts
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from b49e065 to 5714894CompareJuly 13, 2026 14:15
Comment threadpackages/nestjs/src/integrations/wrap-handlers.ts Outdated
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from 5714894 to 139ac5eCompareJuly 13, 2026 15:03
Comment threadpackages/nestjs/src/integrations/wrap-route.ts
Comment threadpackages/nestjs/src/integrations/wrap-route.ts
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch 2 times, most recently from b4e6fdc to 868f6a8CompareJuly 13, 2026 15:24
Comment threadpackages/nestjs/src/integrations/helpers.ts Outdated
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from 868f6a8 to 0ebbf46CompareJuly 13, 2026 15:39

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0ebbf46. Configure here.

Comment threadpackages/nestjs/src/integrations/helpers.ts
Pull the span-emitting/patching logic out of the OTel
`InstrumentationBase` classes into `wrap-components`, `wrap-handlers`,
and `wrap-route` so it can be reused by the diagnostics-channel
integration.
Refactor only. There is still only the OTel implementation, which still
emits the same spans as before. However, this will be needed when the
next implementation is added.
@isaacs
isaacsforce-pushed the isaacs/nestjs-extract-helpers branch from 0ebbf46 to 8f95306CompareJuly 13, 2026 15:47
@isaacs
isaacs merged commit 0ea8a51 into developJul 13, 2026
58 checks passed
@isaacs
isaacs deleted the isaacs/nestjs-extract-helpers branch July 13, 2026 18:15
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.

4 participants

@isaacs@JPeer264@nicohrubec@andreiborza