Skip to content

feat(attributes): Add remaining app context attributes#304

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

feat(attributes): Add remaining app context attributes#304
buenaflor wants to merge 8 commits intomainfrom
giancarlobuenaflor/add-app-context-attributes

Conversation

@buenaflor
Copy link
Copy Markdown
Contributor

@buenaflor buenaflor commented Mar 24, 2026

Add remaining app context attributes and rename existing ones to match payload keys.

New attributes:

  • app.view_names (string[]) — active view/fragment names
  • app.is_split_apks (boolean) — whether the app uses split APKs (Android)
  • app.permissions.<key> (string, dynamic suffix) — permission granted status

Stable -> Deprecated attributes:

  • app.buildapp.app_build
  • app.identifierapp.app_identifier
  • app.nameapp.app_name
  • app.start_timeapp.app_start_time
  • app.versionapp.app_version

PII updates:

  • app.in_foreground PII changed from false to maybe
  • app.is_split_apks and app.permissions.<key> set to PII maybe

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 5 commits March 24, 2026 11:56
Add 18 new device context attributes that were defined in the Sentry
event spec but missing from conventions: battery_level,
battery_temperature, boot_time, charging, free_storage, id,
low_memory, manufacturer, name, online, orientation,
processor_frequency, screen_density, screen_dpi, screen_height_pixels,
screen_width_pixels, storage_size, and usable_memory.

device.id and device.manufacturer are marked as OTel attributes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ibutes

Add device.chipset, device.cpu_description, device.external_storage_size,
device.external_free_storage, device.thermal_state, device.connection_type
(deprecated), and network.connection.type (OTel) attributes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…onnection_type

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 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 remaining app context attributes by buenaflor in #304
  • Add network connection-related attributes by Lms24 in #279
  • Add cache.write attribute by adinauer in #292
  • Add device context attributes by buenaflor in #300
  • 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
  • Redirect from old /generated pages to new routes by Lms24 in #291
  • 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 smol-toml from 1.6.0 to 1.6.1 by dependabot in #305
  • Bump h3 from 1.15.5 to 1.15.9 by dependabot in #299
  • 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
  • (publish) Bump next entries in changelog when releasing by Lms24 in #290
  • (repo) Populate changelog property when running yarn create:attribute by Lms24 in #280
  • Pin GitHub Actions to full-length commit SHAs by joshuarli in #302
  • Wrong link to CONTRIBUTING.md in PR template by sentrivana in #298

🤖 This preview updates automatically when you update the PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

heads-up: array attributes don't yet get forwarded by Relay afaik. But I think the definition makes sense, so let's keep it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Acknowledged — keeping the array attribute definition as-is. Good to know about the Relay forwarding limitation.

— Claude Code

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

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 missing mobile app context attributes and aligns several existing app attribute keys with the actual payload keys, including updated PII classifications.

Changes:

  • Added new app context attributes: app.view_names, app.is_split_apks, and dynamic app.permissions.<key>.
  • Renamed existing app attributes to app.app_* keys to match payload fields.
  • Updated PII classification for app.in_foreground (and set new attributes’ PII to maybe).

Reviewed changes

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

Show a summary per file
File Description
python/src/sentry_conventions/attributes.py Updates Python attribute name constants, metadata, and type hints for new/renamed app attributes.
javascript/sentry-conventions/src/attributes.ts Updates TS exports, metadata, and typing maps for new/renamed app attributes.
model/attributes/app/app__view_names.json Adds app.view_names attribute definition.
model/attributes/app/app__permissions__[key].json Adds dynamic-suffix app.permissions.<key> attribute definition.
model/attributes/app/app__is_split_apks.json Adds app.is_split_apks attribute definition.
model/attributes/app/app__in_foreground.json Updates PII classification for app.in_foreground.
model/attributes/app/app__app_build.json Renames key to app.app_build.
model/attributes/app/app__app_identifier.json Renames key to app.app_identifier.
model/attributes/app/app__app_name.json Renames key to app.app_name.
model/attributes/app/app__app_start_time.json Renames key to app.app_start_time.
model/attributes/app/app__app_version.json Renames key to app.app_version.
Comments suppressed due to low confidence (5)

model/attributes/app/app__app_build.json:2

  • The attribute key has been renamed to app.app_build, but the changelog entry still says "Added app.build attribute". Update the changelog description to reference app.app_build (or explicitly describe this as a rename).
    model/attributes/app/app__app_start_time.json:2
  • The attribute key has been renamed to app.app_start_time, but the changelog entry still says "Added app.start_time attribute". Update the changelog description to reference app.app_start_time (or explicitly describe this as a rename).
    model/attributes/app/app__app_version.json:2
  • The attribute key has been renamed to app.app_version, but the changelog entry still says "Added app.version attribute". Update the changelog description to reference app.app_version (or explicitly describe this as a rename).
    model/attributes/app/app__app_identifier.json:2
  • The attribute key has been renamed to app.app_identifier, but the changelog entry still says "Added app.identifier attribute". Update the changelog description to reference app.app_identifier (or explicitly describe this as a rename).
    model/attributes/app/app__app_name.json:2
  • The attribute key has been renamed to app.app_name, but the changelog entry still says "Added app.name attribute". Update the changelog description to reference app.app_name (or explicitly describe this as a rename).

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

…o canonical app.* names

Instead of renaming app.build to app.app_build, keep app.build as canonical
and add app.app_build as a deprecated attribute with backfill status that
aliases to app.build. Same pattern for app_identifier, app_name,
app_start_time, and app_version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@buenaflor buenaflor force-pushed the giancarlobuenaflor/add-app-context-attributes branch from 25b54f0 to 278a080 Compare March 30, 2026 12:24
Resolve merge conflicts in network.connection.type by combining both alias
sets and regenerating TS/Python attribute files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@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.

Co-Authored-By: Claude Opus 4.6 (1M context) <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.

3 participants