Skip to content

feat(attributes): Add app context attributes for mobile#296

Open
buenaflor wants to merge 8 commits intomainfrom
buenaflor/feat/add-app-context-attributes
Open

feat(attributes): Add app context attributes for mobile#296
buenaflor wants to merge 8 commits intomainfrom
buenaflor/feat/add-app-context-attributes

Conversation

@buenaflor
Copy link

@buenaflor buenaflor commented Mar 19, 2026

Description

Add mobile app context attributes under the app.* namespace:

  • app.name — Human readable application name
  • app.identifier — Version-independent application identifier (bundle ID)
  • app.version — Human readable application version
  • app.build — Internal build identifier
  • app.start_time — UTC timestamp when the user started the application
  • app.in_foreground — Whether the application is currently in the foreground

All attributes are scoped to mobile SDKs: sentry.cocoa, sentry.java.android, sentry.javascript.react-native, sentry.dart.flutter and are already used today.

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.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for pii (i.e. maybe or true. Use false only for values that should never be scrubbed such as IDs)

buenaflor and others added 4 commits March 19, 2026 16:05
Add app.name, app.identifier, app.version, app.build, app.start_time,
and app.in_foreground attributes for mobile app context metadata.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These are redundant with sentry.release which already contains
the app identifier, version, and build number.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Also derivable from existing context and sentry.release.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uild

These provide standalone structured values independent of how
sentry.release is formatted by the user.

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

github-actions bot commented Mar 19, 2026

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

  • Add app context attributes for mobile by buenaflor in #296
  • Add device memory and core count attributes by Lms24 in #281
  • Add ui.element.* attributes by Lms24 in #284
  • Add remaining TTFB, FCP and FP web vital attributes by Lms24 in #235
  • Add LCP web vital meta attributes by Lms24 in #233
  • Add CLS web vital source attribute by Lms24 in #234
  • Add core web web vital value attributes by Lms24 in #229
  • Add allow_any_value field to attribute schema by vgrozdanic in #272

Other

  • (http) Add http.server.request.time_in_queue attribute by dingsdax in #267
  • (resource) Add resource.deployment.environment by mjq in #266
  • Add sentry.timestamp.sequence attribute to the spec by logaretm in #262
  • Add changelog tracking to attribute definitions by ericapisani in #270

Bug Fixes 🐛

  • (attributes) Remove allow_any_value boolean attribute and allow any as type by vgrozdanic in #273
  • (gen_ai) Input and output token description by obostjancic in #261
  • (sentry) Deprecate sentry.trace.parent_span_id by mjq in #287
  • Don't run changelog generation on yarn generate by Lms24 in #277
  • Avoid changelog generation recursion by Lms24 in #274

Documentation 📚

  • (sentry) Add deprecated sentry.source by s1gr1d in #288
  • Remove extra yarn run format instruction by mjq in #289
  • Update README with up-to-date links by ericapisani in #258

Internal Changes 🔧

Deps

  • Bump devalue from 5.6.3 to 5.6.4 by dependabot in #286
  • Bump dompurify from 3.3.1 to 3.3.2 by dependabot in #278
  • Bump svgo from 3.3.2 to 3.3.3 by dependabot in #275
  • Bump svelte from 5.51.5 to 5.53.5 by dependabot in #271
  • Bump rollup from 4.40.1 to 4.59.0 by dependabot in #269
  • Bump svelte from 5.48.1 to 5.51.5 by dependabot in #260

Deps Dev

  • Bump tar from 7.5.10 to 7.5.11 by dependabot in #285
  • Bump tar from 7.5.8 to 7.5.10 by dependabot in #276
  • Bump tar from 7.5.7 to 7.5.8 by dependabot in #259

Other

  • (ai) Deprecate rest of ai.* attributes by constantinius in #264
  • (attributes) Ensure each attribute json has a changelog entry by Lms24 in #282
  • (docs) Upgrade to Astro 6 by Lms24 in #283
  • (gen_ai) Deprecate gen_ai.tool.input, gen_ai.tool.message, gen_ai.tool.output by constantinius in #265
  • (repo) Populate changelog property when running yarn create:attribute by Lms24 in #280

🤖 This preview updates automatically when you update the PR.

@buenaflor buenaflor marked this pull request as ready for review March 19, 2026 15:21
@buenaflor buenaflor requested review from a team, Lms24, cleptric, lcian, mjq and nsdeschenes as code owners March 19, 2026 15:21
Copilot AI review requested due to automatic review settings March 19, 2026 15:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a set of mobile-focused application context attributes under the app.* namespace to the semantic conventions registry and regenerates the language bindings (Python + TypeScript) to expose them consistently.

Changes:

  • Introduces six new app.* attributes in the registry (model/attributes/app/*.json) with SDK scoping for mobile SDKs.
  • Regenerates Python attribute name/constants, metadata map, and typed attribute mapping to include the new keys.
  • Regenerates TypeScript attribute constants/types, metadata, and attribute typing to include the new keys.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
python/src/sentry_conventions/attributes.py Adds new APP_* constants, metadata entries, and typed mappings for app.* attributes.
model/attributes/app/app__build.json Defines registry entry for app.build.
model/attributes/app/app__identifier.json Defines registry entry for app.identifier.
model/attributes/app/app__in_foreground.json Defines registry entry for app.in_foreground.
model/attributes/app/app__name.json Defines registry entry for app.name.
model/attributes/app/app__start_time.json Defines registry entry for app.start_time.
model/attributes/app/app__version.json Defines registry entry for app.version.
javascript/sentry-conventions/src/attributes.ts Adds TypeScript constants/types, metadata, and attribute typing for the new app.* keys.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

buenaflor and others added 2 commits March 19, 2026 16:33
A boolean value cannot contain personal data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
app.start_time, app.version, app.identifier, and app.build cannot
contain personal data. app.name remains maybe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

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.

buenaflor and others added 2 commits March 19, 2026 17:17
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Set pii to maybe for app.version, app.build, app.start_time, and
app.identifier to be consistent with analogous attributes like
browser.version, os.version, and os.build_id. Only app.in_foreground
remains false as a boolean cannot contain PII.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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