Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 44 additions & 2 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9742,6 +9742,30 @@ export const REMIX_ACTION_FORM_DATA_KEY = 'remix.action_form_data.<key>';
*/
export type REMIX_ACTION_FORM_DATA_KEY_TYPE = string;

// Path: model/attributes/replayId.json

/**
* The id of the sentry replay. `replayId`
*
* Attribute Value Type: `string` {@link REPLAYID_TYPE}
*
* Contains PII: false
*
* Attribute defined in OTEL: No
* Visibility: public
*
* Aliases: {@link SENTRY_REPLAY_ID} `sentry.replay_id`
*
* @deprecated Use {@link SENTRY_REPLAY_ID} (sentry.replay_id) instead
* @example "123e4567e89b12d3a456426614174000"
*/
export const REPLAYID = 'replayId';

/**
* Type for {@link REPLAYID} replayId
*/
export type REPLAYID_TYPE = string;

// Path: model/attributes/replay_id.json

/**
Expand Down Expand Up @@ -10929,7 +10953,7 @@ export type SENTRY_RELEASE_TYPE = string;
* Attribute defined in OTEL: No
* Visibility: public
*
* Aliases: {@link REPLAY_ID} `replay_id`
* Aliases: {@link REPLAY_ID} `replay_id`, {@link REPLAYID} `replayId`
*
* @example "123e4567e89b12d3a456426614174000"
*/
Expand Down Expand Up @@ -13676,6 +13700,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[REACT_VERSION]: 'string',
[RELEASE]: 'string',
[REMIX_ACTION_FORM_DATA_KEY]: 'string',
[REPLAYID]: 'string',
[REPLAY_ID]: 'string',
[RESOURCE_DEPLOYMENT_ENVIRONMENT]: 'string',
[RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME]: 'string',
Expand Down Expand Up @@ -14280,6 +14305,7 @@ export type AttributeName =
| typeof REACT_VERSION
| typeof RELEASE
| typeof REMIX_ACTION_FORM_DATA_KEY
| typeof REPLAYID
| typeof REPLAY_ID
| typeof RESOURCE_DEPLOYMENT_ENVIRONMENT
| typeof RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME
Expand Down Expand Up @@ -20497,6 +20523,21 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
sdks: ['javascript-remix'],
changelog: [{ version: '0.1.0', prs: [103] }],
},
[REPLAYID]: {
brief: 'The id of the sentry replay.',
type: 'string',
pii: {
isPii: 'false',
},
isInOtel: false,
visibility: 'public',
example: '123e4567e89b12d3a456426614174000',
deprecation: {
replacement: 'sentry.replay_id',
},
aliases: [SENTRY_REPLAY_ID],
changelog: [{ version: 'next' }],
},
[REPLAY_ID]: {
brief: 'The id of the sentry replay.',
type: 'string',
Expand Down Expand Up @@ -21157,7 +21198,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
isInOtel: false,
visibility: 'public',
example: '123e4567e89b12d3a456426614174000',
aliases: [REPLAY_ID],
aliases: [REPLAY_ID, REPLAYID],
changelog: [{ version: '0.0.0' }],
},
[SENTRY_REPLAY_IS_BUFFERING]: {
Expand Down Expand Up @@ -22874,6 +22915,7 @@ export type Attributes = {
[REACT_VERSION]?: REACT_VERSION_TYPE;
[RELEASE]?: RELEASE_TYPE;
[REMIX_ACTION_FORM_DATA_KEY]?: REMIX_ACTION_FORM_DATA_KEY_TYPE;
[REPLAYID]?: REPLAYID_TYPE;
[REPLAY_ID]?: REPLAY_ID_TYPE;
[RESOURCE_DEPLOYMENT_ENVIRONMENT]?: RESOURCE_DEPLOYMENT_ENVIRONMENT_TYPE;
[RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME]?: RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME_TYPE;
Expand Down
21 changes: 21 additions & 0 deletions model/attributes/replayId.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"key": "replayId",
"brief": "The id of the sentry replay.",
"type": "string",
"pii": {
"key": "false"
},
"is_in_otel": false,
"example": "123e4567e89b12d3a456426614174000",
"alias": ["sentry.replay_id"],
"deprecation": {
"_status": null,
"replacement": "sentry.replay_id"
},
"visibility": "public",
"changelog": [
{
"version": "next"
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.

nit: we can link to this PR for reference

Suggested change
"version": "next"
"version": "next"
"prs": [401]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Double-checking - is this necessary? I used to think it was, but it looks like it's actually handled automatically by the generation script (the one that rewrites next into the version number).

function extractPrNumber(message: string): number | undefined {
const match = message.match(/\(#(\d+)\)\s*$/);
return match ? Number(match[1]) : undefined;
}

// Extract PR numbers from all commits in this version (respecting ignore list)
const prs = new Set<number>();
for (const commit of commits) {
if (isCommitIgnored(commit.hash)) {
const pr = extractPrNumber(commit.message);
if (pr !== undefined) skippedPrs.add(pr);
continue;
}
const pr = extractPrNumber(commit.message);
if (pr !== undefined) {
prs.add(pr);
}
}
// Don't create empty 'next' entries — commits without PR numbers are
// infrastructure/tooling changes, not real attribute changes
if (to === 'next' && prs.size === 0) {
continue;
}
const entry: ChangelogEntry = { version: to };
if (prs.size > 0) {
entry.prs = Array.from(prs).sort((a, b) => a - b);
}
changelog.push(entry);

Copy link
Copy Markdown
Member

@Lms24 Lms24 May 22, 2026

Choose a reason for hiding this comment

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

The generate_attribute_changelog.ts script currently isn't called at release time. AFAIK, this was meant to run manually once but not repeatedly (will check and delete if so). For releases, we only the bump_attribute_changelog.ts script. But this one only does the "next" to {new_version} conversion but doesn't add the PR number. Something we should fix! I'll look into this.

For this PR, no strong feelings. Feel free to merge with or without the PR reference!

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 remembered why generate_attribute_changelog isn't called at release: It takes 5+ minutes locally to run because it looks at every attribute x every single version of conventions to "backfill" PRs and version data from git history. I think we can make this a bit faster for releases by limiting it to "next" entries.

}
]
}
2 changes: 1 addition & 1 deletion model/attributes/sentry/sentry__replay_id.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"is_in_otel": false,
"example": "123e4567e89b12d3a456426614174000",
"alias": ["replay_id"],
"alias": ["replay_id", "replayId"],
"visibility": "public",
"changelog": [
{
Expand Down
32 changes: 30 additions & 2 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ class _AttributeNamesMeta(type):
"PERFORMANCE_TIMEORIGIN",
"QUERY_KEY",
"RELEASE",
"REPLAYID",
"REPLAY_ID",
"RESOURCE_DEPLOYMENT_ENVIRONMENT",
"RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME",
Expand Down Expand Up @@ -5706,6 +5707,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Example: "http.response.header.text='test'"
"""

# Path: model/attributes/replayId.json
REPLAYID: Literal["replayId"] = "replayId"
"""The id of the sentry replay.

Type: str
Contains PII: false
Defined in OTEL: No
Visibility: public
Aliases: sentry.replay_id
DEPRECATED: Use sentry.replay_id instead
Example: "123e4567e89b12d3a456426614174000"
"""

# Path: model/attributes/replay_id.json
REPLAY_ID: Literal["replay_id"] = "replay_id"
"""The id of the sentry replay.
Expand Down Expand Up @@ -6364,7 +6378,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Contains PII: false
Defined in OTEL: No
Visibility: public
Aliases: replay_id
Aliases: replay_id, replayId
Example: "123e4567e89b12d3a456426614174000"
"""

Expand Down Expand Up @@ -14038,6 +14052,19 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
ChangelogEntry(version="0.1.0", prs=[103]),
],
),
"replayId": AttributeMetadata(
brief="The id of the sentry replay.",
type=AttributeType.STRING,
pii=PiiInfo(isPii=IsPii.FALSE),
is_in_otel=False,
visibility=Visibility.PUBLIC,
example="123e4567e89b12d3a456426614174000",
deprecation=DeprecationInfo(replacement="sentry.replay_id"),
aliases=["sentry.replay_id"],
changelog=[
ChangelogEntry(version="next"),
],
),
"replay_id": AttributeMetadata(
brief="The id of the sentry replay.",
type=AttributeType.STRING,
Expand Down Expand Up @@ -14706,7 +14733,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
is_in_otel=False,
visibility=Visibility.PUBLIC,
example="123e4567e89b12d3a456426614174000",
aliases=["replay_id"],
aliases=["replay_id", "replayId"],
changelog=[
ChangelogEntry(version="0.0.0"),
],
Expand Down Expand Up @@ -16502,6 +16529,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"react.version": str,
"release": str,
"remix.action_form_data.<key>": str,
"replayId": str,
"replay_id": str,
"resource.deployment.environment": str,
"resource.deployment.environment.name": str,
Expand Down
21 changes: 21 additions & 0 deletions shared/deprecated_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,27 @@
}
]
},
{
"key": "replayId",
"brief": "The id of the sentry replay.",
"type": "string",
"pii": {
"key": "false"
},
"is_in_otel": false,
"example": "123e4567e89b12d3a456426614174000",
"alias": ["sentry.replay_id"],
"deprecation": {
"_status": null,
"replacement": "sentry.replay_id"
},
"visibility": "public",
"changelog": [
{
"version": "next"
}
]
},
{
"key": "replay_id",
"brief": "The id of the sentry replay.",
Expand Down
Loading