feat(nestjs)!: Use function span op for setup & lifecycle handlers - #22897
Conversation
size-limit report 📦
|
cfddf2c to
5390356
Compare
function span op for setup & lifecycle handlersfunction span op for setup & lifecycle handlers
5390356 to
7bdc904
Compare
7bdc904 to
f9519b4
Compare
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>
f9519b4 to
fed2041
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fed2041. Configure here.
| @@ -1,5 +1,5 @@ | |||
| import { SENTRY_OP } from '@sentry/conventions/attributes'; | |||
| import { WEB_SERVER_MIDDLEWARE_SPAN_OP } from '@sentry/conventions/op'; | |||
| import { WEB_SERVER_FUNCTION_SPAN_OP, WEB_SERVER_MIDDLEWARE_SPAN_OP } from '@sentry/conventions/op'; | |||
There was a problem hiding this comment.
Wrong function span op constant
High Severity
This migration imports WEB_SERVER_FUNCTION_SPAN_OP, but the cross-framework function op constant used elsewhere in this repo is GENERAL_FUNCTION_SPAN_OP (see Angular and Cloudflare). function is a general-category op, not a web-server one, so this constant name does not match the intended shared convention and is not used anywhere else in the monorepo.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit fed2041. Configure here.


Migrates the NestJS setup/lifecycle span ops to the cross-framework
functionop.app_creation.nestjsfunctionrequest_context.nestjsfunctionevent.nestjsfunctionPart of #22446