feat(frameworks)!: Use function op for framework functions - #23047
feat(frameworks)!: Use function op for framework functions#23047msonnb wants to merge 5 commits into
function op for framework functions#23047Conversation
|
c'mon, do something |
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 0306fef. Configure here.
size-limit report 📦
|
0306fef to
502d908
Compare
| ); | ||
|
|
||
| expect(actionSpan).toBeDefined(); | ||
| expect(actionSpan?.op).toBe('action.remix'); |
There was a problem hiding this comment.
l: do we (need to) preserve this information somehow that this is action or loader? do we set code.function.name here? if we set it we should probably also assert on it
There was a problem hiding this comment.
yes we set it and implicitly asserted it by using it in the .find() predicate above, but added an explicit assertion and changed to code.function.name since code.function will be deprecated 👍
| const middlewareSpan = transaction?.spans?.find( | ||
| (span: { data?: { 'sentry.op'?: string } }) => span.data?.['sentry.op'] === 'function.react_router.middleware', | ||
| ); | ||
| const middlewareSpan = transaction?.spans?.find(span => span.data?.['code.function.name'] === 'middleware'); |
There was a problem hiding this comment.
l: are these actually middlewares or just functions that are called middleware? if the former shouldn't the op be middleware?
There was a problem hiding this comment.
good catch! updated to middleware
| trace_id: expect.any(String), | ||
| data: { | ||
| 'sentry.origin': 'auto.http.react_router', | ||
| 'sentry.op': 'function.react_router.action', |
There was a problem hiding this comment.
q: same here is action preserved as code.function.name?

Framework function spans previously each carried a granular, per-framework op (
function.sveltekit.load,function.react_router.loader,function.nextjs,function.remix.document_request,function.server_action,function.tanstackstart, …). This unifies them onto the standardizedfunctionop from conventionsThe detail that lived in the op now lives in
sentry.originandcode.function.name(the wrapped function's real name), added where the origin alone no longer distinguishes spans.Affected:
sveltekit,react-router,nextjs,remix,solidstart,tanstackstart-react.part of #22446