Skip to content

feat(attributes): Add and deprecate runtime context attributes - #383

Merged
markushi merged 6 commits into
mainfrom
markushi/add-runtime-context-attributes
Jun 1, 2026
Merged

markushi merged 6 commits into
mainfrom
markushi/add-runtime-context-attributes

Conversation

@markushi

@markushi markushi commented May 15, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds the runtime event context as deprecated attributes. SDKs (e.g. sentry-java, sentry-cocoa) are currently sending these but they were never formally defined in conventions. They are deprecated in favor of the existing OTel-aligned process.runtime.* attributes.

Attributes

Attribute Replacement Notes
runtime.name process.runtime.name
runtime.version process.runtime.version
runtime.raw_description process.runtime.description
runtime.build — No direct OTel equivalent

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 <[email protected]>
@markushi
markushi requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners May 15, 2026 14:36
@github-actions

github-actions Bot commented May 15, 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

  • Add and deprecate runtime context attributes by markushi in #383
  • Add Android Runtime (ART) GC and memory attributes by markushi in #382
  • Add db.stored_procedure.name and ensure span name attribute consistency by Lms24 in #398
  • Add Cloudflare SDK attributes by JPeer264 in #392

Other

  • Add missing GCP and FaaS attributes by ericapisani in #403

Bug Fixes 🐛

  • (cloudfare) Add missing visibility attributes by markushi in #408

🤖 This preview updates automatically when you update the PR.

@buenaflor buenaflor left a comment

Copy link
Copy Markdown
Contributor

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?

@buenaflor buenaflor left a comment •

Copy link
Copy Markdown
Contributor

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

markushi commented May 15, 2026 •

Copy link
Copy Markdown
Member Author

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

@Lms24 Lms24 left a comment •

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.

I agree, we should deprecate the runtime namespace in favour of process.runtime. I think it's okay for now to continue sending the old ones if we already did this before but long-term, we should align to OTel's specification.

(Meaning, for this PR, we add and deprecate the runtime.* attributes and also add the missing process.runtime.* replacements)

…runtime.*

Mark runtime.name, runtime.version, runtime.raw_description, and
runtime.build as deprecated, pointing to their OTel-aligned
process.runtime.* equivalents. Add symmetric aliases between the
old and new attribute names.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

@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 2 potential issues.

Fix All in Cursor

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

Reviewed by Cursor Bugbot for commit 083bdff. Configure here.

"deprecation": {
"reason": "The runtime.* namespace is deprecated in favor of process.runtime.*. No direct OTel equivalent exists for this attribute.",
"_status": null
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

runtime.build incorrectly marked deprecated

Medium Severity

The PR specifies that runtime.build has no OTel equivalent and should stay non-deprecated, but the model adds a deprecation block and generated SDK output marks RUNTIME_BUILD as deprecated with no replacement. That steers integrators away from the only top-level attribute for runtime build strings.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 083bdff. Configure here.

@markushi markushi changed the title feat(attributes): Add runtime context attributes feat(attributes): Add and deprecate runtime context attributes May 26, 2026
Incorporate visibility field from main into runtime and
process.runtime attribute definitions. Regenerate all code.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
markushi and others added 3 commits May 29, 2026 21:40
Resolve conflict in shared/deprecated_attributes.json by accepting its
deletion (main removed the deprecated-attributes JSON generation in #404).
Regenerate JS/Python attribute code and docs.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@markushi
markushi merged commit bd6c27b into main Jun 1, 2026
15 checks passed
@markushi
markushi deleted the markushi/add-runtime-context-attributes branch June 1, 2026 14:53
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