Conversation
`op` duplicates the `sentry.op` span attribute, which is the canonical way to categorize a span. It will be removed in a future version; the deprecation deliberately does not name a specific one. All internal usages are rewritten to set `sentry.op` (via the `SENTRY_OP` constant from `@sentry/conventions`) instead. Precedence is unchanged everywhere: an explicit `sentry.op` attribute still wins over `op`. Call sites that already set both now only set the attribute. `browserTracingIntegration` is the one exception that still touches `op`: `beforeStartSpan` is a public hook that receives and may override it, so the option is kept in the options handed to the hook and only folded into `sentry.op` afterwards. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 dbe044c. Configure here.
| if (finalStartSpanOptions.op !== originalOp) { | ||
| // oxlint-disable-next-line typescript/no-deprecated | ||
| attributes[SENTRY_OP] = finalStartSpanOptions.op; | ||
| } |
There was a problem hiding this comment.
beforeStartSpan can drop span op
Medium Severity
The beforeStartSpan backfill writes finalStartSpanOptions.op onto sentry.op whenever it differs from the original attribute. Omitting the deprecated op field (or setting both, which the deprecation says should prefer the attribute) overwrites or deletes sentry.op, so pageload and navigation spans can lose their op.
Reviewed by Cursor Bugbot for commit dbe044c. Configure here.
|
Closing as for now, I think this is an unnecessary change given we can still support top-level |


This PR deprecates the
opStartSpanOptionsproperty.sentry.opattribute which is straight forwardopusages were replacedSplit out of #23819. Stacked on top of #23821 (
forceTransactiondeprecation), so review that one first.