Skip to content

feat(replays): Define replayId as a deprecated attribute - #401

Merged
mjq merged 1 commit into
mainfrom
mjq/replayid-alias
Sep 11, 2026
Merged

mjq merged 1 commit into
mainfrom
mjq/replayid-alias

Conversation

@mjq

@mjq mjq commented May 21, 2026

Copy link
Copy Markdown
Member

Description

SDKs currently send replayId on spans, but we'd like to standardize on sentry.replay_id (already defined and in use for other telemetry types). Marking it as deprecated lets the product transparently query either name and return results for either attribute.

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.

@github-actions

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

  • (op) Add ui.resolve span op by Lms24 in #633
  • (replays) Define replayId as a deprecated attribute by mjq in #401

Internal Changes 🔧

  • (deps) Bump smol-toml from 1.6.1 to 1.8.0 by dependabot in #635

🤖 This preview updates automatically when you update the PR.

@mjq
mjq force-pushed the mjq/replayid-alias branch from 5227d29 to ff09ad8 Compare May 21, 2026 20:39
Comment thread model/attributes/replayId.json
SDKs currently send `replayId` on spans, but we'd like to standardize on
`sentry.replay_id` (already defined and in use for other telemetry types).
Marking it as deprecated lets the product transparently query either name and
return results for either attribute.
@mjq
mjq force-pushed the mjq/replayid-alias branch from ff09ad8 to 69751cf Compare September 11, 2026 17:40
@mjq
mjq marked this pull request as ready for review September 11, 2026 17:41
@mjq
mjq requested review from a team, cleptric and nsdeschenes as code owners September 11, 2026 17:41
Comment on lines +11 to +14
"deprecation": {
"_status": null,
"replacement": "sentry.replay_id"
},

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 replayId attribute has _status: null, which prevents it from being correctly linked to the sentry.replay_id deprecation chain, leading to incomplete query results.
Severity: MEDIUM

Suggested Fix

In model/attributes/replayId.json, change the _status field from null to "normalize". This will classify it as a rewriting deprecation and ensure it is correctly linked into the sentry.replay_id deprecation chain.

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: model/attributes/replayId.json#L11-L14

Potential issue: The `replayId` attribute is being deprecated with `_status: null` in
`replayId.json`. The `isRewritingDeprecation` function requires a non-null status to
identify a rewriting deprecation. Because the status is null, the
`deriveAttributeKeyChains` function fails to link `replayId` to the deprecation chain of
its canonical name, `sentry.replay_id`. This results in `replayId` having an isolated
deprecation chain, which prevents queries for `sentry.replay_id` from including results
from `replayId`, contrary to the PR's goal of transparently querying either name.

Also affects:

  • javascript/sentry-conventions/src/search.ts:9753~9758

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

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

LGTM!

@mjq
mjq merged commit 8cf9c51 into main Sep 11, 2026
17 checks passed
@mjq
mjq deleted the mjq/replayid-alias branch September 11, 2026 17:49
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