Skip to content

feat(attributes): Add runtime context attributes#383

Open
markushi wants to merge 1 commit into
mainfrom
markushi/add-runtime-context-attributes
Open

feat(attributes): Add runtime context attributes#383
markushi wants to merge 1 commit into
mainfrom
markushi/add-runtime-context-attributes

Conversation

@markushi
Copy link
Copy Markdown
Member

@markushi markushi commented May 15, 2026

Summary

  • Adds top-level runtime.* attributes that map to the existing Sentry runtime context fields
  • New attributes: runtime.name, runtime.version, runtime.build, runtime.raw_description
  • The existing runtime context appears to be deprecated by the OTel process.runtime.* attributes, so runtime.name, runtime.version, and runtime.raw_description are marked as deprecated with _status: backfill, pointing to process.runtime.name, process.runtime.version, and process.runtime.description respectively
  • Cross-aliases are added on both sides per the deprecation policy
  • runtime.build has no OTel equivalent and remains non-deprecated

Test plan

  • yarn test passes (5290 JS + 3 Python tests)
  • yarn run generate ran successfully
  • Verify generated docs render correctly

🤖 Generated with Claude Code

Add top-level runtime.* attributes mapping to the Sentry runtime context:
runtime.name, runtime.version, runtime.build, and runtime.raw_description.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@markushi markushi requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners May 15, 2026 14:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 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 runtime context attributes by markushi in #383
  • Add calculated performance scores by loewenheim in #355
  • Add rpc.response.status_code attribute by alexander-alderman-webb in #352
  • Add rpc.method attribute by alexander-alderman-webb in #351
  • Add app vitals start attributes by buenaflor in #353
  • Add process.runtime.engine.* attributes by chargome in #347

Bug Fixes 🐛

Attributes

  • Increase some PII values by loewenheim in #373
  • Change several deprecation statuses to normalize to align with ingestion paths by constantinius in #350

Other

  • (create) Replace angle brackets in file names by loewenheim in #356

Internal Changes 🔧

  • (gh) Remove myself from CODEOWNERS by lcian in #354
  • Bump vulnerable pytest by alexander-alderman-webb in #360
  • Bump vulnerable js packages by chargome in #359

🤖 This preview updates automatically when you update the PR.

Copy link
Copy Markdown
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

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

are these the runtime attributes that we send in mobile today?

Copy link
Copy Markdown
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

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

I think we should add these since we already send them but deprecate them in favour of something else

it'd confusing looking at this + process.runtime

additionally I saw process.runtime.name is supposed to be the same as this runtime.name

https://getsentry.github.io/sentry-conventions/attributes/process/#process-runtime-name

@markushi
Copy link
Copy Markdown
Member Author

markushi commented May 15, 2026

Yeah it's confusing, as far as I can see runtime exists for a while now (e.g. sentry-java backend or cocoa).

process.runtime looks like some otel based attributes, happy to use those instead, but I guess it would require some migration path right?

When in doubt, prefer OTel alignment. Sentry conventions should only extend OTel, not diverge from it.

@buenaflor
Copy link
Copy Markdown
Contributor

I guess it would require some migration path right?

yea, though migrations like backfilling and coalescing are currently limited to EAP afaict

we don't need to migrate SDKs now but I guess it does make sense to at least document it as a deprecated attribute

e.g runtime.name deprecated in favour of process.runtime.name

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