Skip to content

feat(nestjs)!: Use function span op for setup & lifecycle handlers - #22897

Open
msonnb wants to merge 1 commit into
ms/js-3105-handler-function-opfrom
ms/js-3105-lifecycle-function-op
Open

feat(nestjs)!: Use function span op for setup & lifecycle handlers#22897
msonnb wants to merge 1 commit into
ms/js-3105-handler-function-opfrom
ms/js-3105-lifecycle-function-op

Conversation

@msonnb

@msonnb msonnb commented Jul 31, 2026

Copy link
Copy Markdown
Member

Migrates the NestJS setup/lifecycle span ops to the cross-framework function op.

Old op New op
app_creation.nestjs function
request_context.nestjs function
event.nestjs function

Part of #22446

@linear-code

linear-code Bot commented Jul 31, 2026

Copy link
Copy Markdown

JS-3105

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.82 kB added added
@sentry/browser - with treeshaking flags 28.02 kB added added
@sentry/browser (incl. Tracing) 47.08 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 47.09 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.82 kB added added
@sentry/browser (incl. Tracing, Replay) 86.39 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.83 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 91.11 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.76 kB added added
@sentry/browser (incl. Feedback) 47.13 kB added added
@sentry/browser (incl. sendFeedback) 34.66 kB added added
@sentry/browser (incl. FeedbackAsync) 39.76 kB added added
@sentry/browser (incl. Metrics) 30.89 kB added added
@sentry/browser (incl. Logs) 31.12 kB added added
@sentry/browser (incl. Metrics & Logs) 31.8 kB added added
@sentry/react 31.6 kB added added
@sentry/react (incl. Tracing) 49.33 kB added added
@sentry/vue 34.74 kB added added
@sentry/vue (incl. Tracing) 49.05 kB added added
@sentry/svelte 29.85 kB added added
CDN Bundle 31.87 kB added added
CDN Bundle (incl. Tracing) 47.45 kB added added
CDN Bundle (incl. Logs, Metrics) 33.42 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 48.82 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 72.78 kB added added
CDN Bundle (incl. Tracing, Replay) 85.08 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.38 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 90.85 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.16 kB added added
CDN Bundle - uncompressed 95.04 kB added added
CDN Bundle (incl. Tracing) - uncompressed 142.27 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.75 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.25 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.51 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.52 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.49 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.23 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.18 kB added added
@sentry/nextjs (client) 51.92 kB added added
@sentry/sveltekit (client) 47.51 kB added added
@sentry/core/server 79.61 kB added added
@sentry/core/browser 51.58 kB added added
@sentry/node 121.35 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B added added
@sentry/node - without tracing 84.77 kB added added
@sentry/aws-serverless 93.02 kB added added
@sentry/cloudflare (withSentry) - minified 197.59 kB added added
@sentry/cloudflare (withSentry) 485.77 kB added added

Migrate the NestJS setup/lifecycle span ops to the cross-framework
`function` op:

- `app_creation.nestjs`    -> `function`
- `request_context.nestjs` -> `function`
- `event.nestjs`           -> `function`

Op is set via the `sentry.op` attribute only; the `nestjs.type` attribute
(`app_creation` / `request_context` / `handler`) is unchanged, so span-shape
filters keep working. Lookups that previously keyed on the distinct
`request_context` op are re-keyed on `nestjs.type`, since it now shares the
`function` op and `auto.http.nestjs` origin with the request handler span.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@msonnb
msonnb force-pushed the ms/js-3105-lifecycle-function-op branch from cfddf2c to 5390356 Compare July 31, 2026 08:12
@msonnb msonnb changed the title feat(node)!: Use function span op for setup & lifecycle handlers feat(nestjs)!: Use function span op for setup & lifecycle handlers Jul 31, 2026
@msonnb
msonnb marked this pull request as ready for review July 31, 2026 08:22
@msonnb
msonnb requested a review from a team as a code owner July 31, 2026 08:22
@msonnb
msonnb requested review from nicohrubec and s1gr1d and removed request for a team July 31, 2026 08:22
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