Skip to content

feat(op): Add mobile OTA update span operations - #540

Open
antonis wants to merge 2 commits into
mainfrom
antonis/feat/mobile-app-update-ops
Open

feat(op): Add mobile OTA update span operations#540
antonis wants to merge 2 commits into
mainfrom
antonis/feat/mobile-app-update-ops

Conversation

@antonis

@antonis antonis commented Jul 28, 2026

Copy link
Copy Markdown

Description

Add app.update.check and app.update.download span operations to the mobile category.

These operations track the timing of over-the-air (OTA) update lifecycle steps in mobile apps — checking whether an update is available, and downloading it. The operations are intentionally generic and not tied to a specific OTA framework (e.g., Expo Updates, CodePush).

First consumer: sentry-react-native#6430 adds these spans to the expoUpdatesListenerIntegration.

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

Add `app.update.check` and `app.update.download` span operations to the
mobile category for tracking over-the-air update timing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Complete net.* aliases and transform net.transport by JPeer264 in #588
  • Name the replacements for the deprecated http.target by JPeer264 in #587
  • Add url.path.params.<key> (deprecated) in favor of url.path.parameter.<key> by JPeer264 in #586
  • Add graphql.source (deprecated) in favor of graphql.document by JPeer264 in #584
  • Add legacy Vercel AI span attributes (deprecated) by JPeer264 in #583
  • Add legacy AMQP and Redis span attributes (deprecated) by JPeer264 in #581
  • Add HTTP body size and status text attributes by msonnb in #574
  • Add graphql.processing.type by andreiborza in #572

Other

  • (op) Add mobile OTA update span operations by antonis in #540
  • (span-names) Add url.domainrule for http.client spans by Lms24 in #575

Bug Fixes 🐛

Names

  • Add gen_ai.function_id and gen_ai.pipeline.name to agent span name templates by RulaKhaled in #593
  • Add missing gen_ai ops to span name rules by Lms24 in #579
  • Include tool name in gen_ai.execute_tool span names by Lms24 in #580
  • Correct graphql span name examples by andreiborza in #573

Internal Changes 🔧

  • (attributes) Add search alias for segment name by nsdeschenes in #577
  • (search-metadata) Add visibility field by nsdeschenes in #597

🤖 This preview updates automatically when you update the PR.

@antonis
antonis enabled auto-merge (squash) August 28, 2026 13:31
*/
export const MOBILE_APP_UPDATE_DOWNLOAD_SPAN_OP = 'app.update.download';

export const MOBILE_UI_SPAN_OP = 'ui';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The code generation script incorrectly creates a duplicate constant MOBILE_UI_SPAN_OP = 'ui', even though the ui operation is already owned and exported by the browser category.
Severity: MEDIUM

Suggested Fix

Correct the code generation script (scripts/generate_op.ts) to properly enforce the ownership and deduplication logic. The script should filter out operations that are already owned by another category. After fixing the script, regenerate the affected files to remove the unintended MOBILE_UI_SPAN_OP constant.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: javascript/sentry-conventions/src/op.ts#L416

Potential issue: The code generation script in `scripts/generate_op.ts` is intended to
deduplicate constants by assigning ownership to the first category (alphabetically) that
defines an operation with a description. For the `'ui'` operation, `browser.json` should
be the sole owner. However, the generated `op.ts` file incorrectly includes a second
constant, `MOBILE_UI_SPAN_OP = 'ui'`, derived from `mobile.json`. This results in two
constants with different names but the same string value. This duplication creates API
confusion, introduces naming inconsistencies, and could lead to future maintenance
issues if developers use the unintended constant.

Also affects:

  • rust/src/op.rs:285

Did we get this right? 👍 / 👎 to inform future reviews.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6fa0068. Configure here.

*/
export const MOBILE_APP_UPDATE_DOWNLOAD_SPAN_OP = 'app.update.download';

export const MOBILE_UI_SPAN_OP = 'ui';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated op constants named incorrectly

Medium Severity

The new generated constants MOBILE_APP_UPDATE_CHECK_SPAN_OP, MOBILE_APP_UPDATE_DOWNLOAD_SPAN_OP, and MOBILE_UI_SPAN_OP keep the dropped category prefix and _SPAN_OP suffix. The generator emits APP_UPDATE_CHECK and APP_UPDATE_DOWNLOAD, and does not re-emit ui because UI already exists. These names will change on the next generate, and MOBILE_UI_SPAN_OP duplicates UI.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6fa0068. Configure here.

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.

2 participants