Repository navigation
feat(ops)!: Drop category prefix and SPAN_OP suffix from op constants - #565
Merged
Merged
Conversation
Semver Impact of This PR🔴 Major (breaking changes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Breaking Changes 🛠
New Features ✨Attributes
Op
Bug Fixes 🐛
Internal Changes 🔧Deps
Other
🤖 This preview updates automatically when you update the PR. |
Span op constants were named `<CATEGORY>_<OP>_SPAN_OP`. The category carries no meaning beyond grouping the model files, so it only produced stutter like `GEN_AI_GEN_AI_INVOKE_AGENT_SPAN_OP`. Derive the name from the op string alone and drop the redundant suffix, leaving `GEN_AI_INVOKE_AGENT` and `PAGELOAD`. Without the category, eight ops defined in more than one category (`http`, `ui`, `navigation`, `grpc`, `function`, `app`, `file`, `serialize`) collide. They share the same op value, so emit each exactly once, in the category that documents it, falling back to the first category alphabetically. Op files are now read in sorted order so that fallback cannot differ between platforms. Downstream impact is minimal: Relay does not use the generated Rust ops, no ops are generated for Python, and the Sentry frontend does not consume ops from the JS package. The JS SDK uses a handful and needs a rename. BREAKING CHANGE: Generated span op constants are renamed in the JS package and the Rust crate. `BROWSER_PAGELOAD_SPAN_OP` is now `PAGELOAD`, `GEN_AI_GEN_AI_INVOKE_AGENT_SPAN_OP` is now `GEN_AI_INVOKE_AGENT`. Op values are unchanged. Fixes #546 Refs CON-101 Co-Authored-By: Claude <[email protected]>
Lms24
force-pushed
the
feat/rename-span-op-constants
branch
from
August 10, 2026 15:55
80a3daf to
e79466b
Compare
SPAN_OP suffix from constantsSPAN_OP suffix from op constants
Lms24
marked this pull request as ready for review
August 11, 2026 08:42
Lms24
requested review from
a team,
cleptric,
mjq and
nsdeschenes
as code owners
August 11, 2026 08:42
nsdeschenes
approved these changes
Aug 11, 2026
4 tasks
logaretm
pushed a commit
to getsentry/sentry-javascript
that referenced
this pull request
Aug 24, 2026
0.20.0 drops the category prefix and `_SPAN_OP` suffix from the `op` constants (getsentry/sentry-conventions#565), which removes every `*_SPAN_OP` export the SDK imported. Old names were mapped to new ones by their string value rather than by guessing the name transformation, so collapsed constants resolve correctly — `GENERAL_FUNCTION_SPAN_OP` and `WEB_SERVER_FUNCTION_SPAN_OP` both became `FUNCTION`, and the three `*_HTTP_SPAN_OP` variants all became `HTTP`. All 124 old values still exist in 0.20.0 with no ambiguity, so the rename is value-preserving. These constants are internal only — nothing re-exports them from a public entry point — so this is not a breaking change for SDK users. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
alwx
added a commit
that referenced
this pull request
Sep 22, 2026
Resolve the generated python/src/sentry_conventions/attributes.py conflict and re-run `yarn generate`. The op constant is now emitted as `TURBO_MODULE` after #565 dropped the category prefix and `SPAN_OP` suffix from op constants.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Span op constants were named
<CATEGORY>_<OP>_SPAN_OP, where the category only groups the model files and carries no meaning. This cause sub-optimal export names likeGEN_AI_GEN_AI_INVOKE_AGENT_SPAN_OPorBROWSER_PAGELOAD_SPAN_OP. Names are now generated just from the op string:GEN_AI_INVOKE_AGENT,PAGELOAD. Op values are unchanged, and no model files were harmed during the creation of this PR. This is a breaking change though but I checked and the JS SDK is the only consumer of ops. We're fine with the breakage and can easily handle it.Fixes #546
Refs #546