From 69751cf30972e1b0169681dc49ee63ade07bb231 Mon Sep 17 00:00:00 2001 From: Matt Quinn Date: Thu, 21 May 2026 16:30:08 -0400 Subject: [PATCH] feat(replays): Define `replayId` as a deprecated attribute 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. --- .../sentry-conventions/src/attributes.ts | 47 ++++++++++++++++++- javascript/sentry-conventions/src/search.ts | 14 ++++++ model/attributes/replayId.json | 21 +++++++++ .../attributes/sentry/sentry__replay_id.json | 2 +- python/src/sentry_conventions/attributes.py | 33 ++++++++++++- 5 files changed, 112 insertions(+), 5 deletions(-) create mode 100644 model/attributes/replayId.json diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 10495f44..18bf08c3 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -14070,6 +14070,30 @@ export const REMIX_ACTION_FORM_DATA_KEY_BASE = 'remix.action_form_data'; */ 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} + * + * Apply Scrubbing: never + * + * 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 /** @@ -15736,7 +15760,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" */ @@ -19358,6 +19382,7 @@ export const ATTRIBUTE_TYPE: Record = { 'redis.key': 'string', release: 'string', 'remix.action_form_data.': 'string', + replayId: 'string', replay_id: 'string', 'resource.deployment.environment': 'string', 'resource.deployment.environment.name': 'string', @@ -20196,6 +20221,7 @@ export type AttributeName = | typeof REDIS_KEY | typeof RELEASE | typeof REMIX_ACTION_FORM_DATA_KEY + | typeof REPLAYID | typeof REPLAY_ID | typeof RESOURCE_DEPLOYMENT_ENVIRONMENT | typeof RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME @@ -30421,6 +30447,22 @@ export const ATTRIBUTE_METADATA: Record = { example: "http.response.header.text='test'", changelog: [{ version: '0.1.0', prs: [103] }], }, + replayId: { + brief: 'The id of the sentry replay.', + type: 'string', + keys: ['replayId'], + applyScrubbing: { + key: 'never', + }, + 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', @@ -31567,7 +31609,7 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: false, visibility: 'public', example: '123e4567e89b12d3a456426614174000', - aliases: ['replay_id'], + aliases: ['replay_id', 'replayId'], changelog: [{ version: '0.0.0' }], searchAlias: { name: 'replay.id', @@ -34204,6 +34246,7 @@ export type Attributes = { [REDIS_KEY]?: REDIS_KEY_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; diff --git a/javascript/sentry-conventions/src/search.ts b/javascript/sentry-conventions/src/search.ts index 99ed2c67..41b14c27 100644 --- a/javascript/sentry-conventions/src/search.ts +++ b/javascript/sentry-conventions/src/search.ts @@ -3602,6 +3602,13 @@ export const SEARCH_REMIX__ACTION_FORM_DATA__KEY = 'remix.action_form_data. */ export const SEARCH_REPLAY__ID = 'replay.id'; +/** + * Search name for {@link attributes.REPLAYID}. `replayId` + * + * @deprecated Use {@link SEARCH_SENTRY__REPLAY_ID} (`sentry.replay_id`) instead + */ +export const SEARCH_REPLAYID = 'replayId'; + /** * Search name for {@link attributes.SENTRY_REPLAY_ID}. `replay_id` * @@ -5453,6 +5460,7 @@ export type AttributeSearchName = | typeof SEARCH_RELEASE | typeof SEARCH_REMIX__ACTION_FORM_DATA__KEY | typeof SEARCH_REPLAY__ID + | typeof SEARCH_REPLAYID | typeof SEARCH_REPLAY_ID | typeof SEARCH_RESOURCE__DEPLOYMENT__ENVIRONMENT | typeof SEARCH_RESOURCE__DEPLOYMENT__ENVIRONMENT__NAME @@ -9742,6 +9750,12 @@ export const ATTRIBUTE_SEARCH_METADATA: Record brief: 'The id of the sentry replay.', deprecationChain: ['sentry.replay_id', 'replay.id', 'replay_id'], }, + replayId: { + canonicalName: 'sentry.replay_id', + type: 'string', + brief: 'The id of the sentry replay.', + deprecationChain: ['replayId'], + }, replay_id: { canonicalName: 'sentry.replay_id', type: 'string', diff --git a/model/attributes/replayId.json b/model/attributes/replayId.json new file mode 100644 index 00000000..cab8be9c --- /dev/null +++ b/model/attributes/replayId.json @@ -0,0 +1,21 @@ +{ + "key": "replayId", + "brief": "The id of the sentry replay.", + "type": "string", + "apply_scrubbing": { + "key": "never" + }, + "is_in_otel": false, + "example": "123e4567e89b12d3a456426614174000", + "alias": ["sentry.replay_id"], + "deprecation": { + "_status": null, + "replacement": "sentry.replay_id" + }, + "visibility": "public", + "changelog": [ + { + "version": "next" + } + ] +} diff --git a/model/attributes/sentry/sentry__replay_id.json b/model/attributes/sentry/sentry__replay_id.json index f7a36e34..6b70833c 100644 --- a/model/attributes/sentry/sentry__replay_id.json +++ b/model/attributes/sentry/sentry__replay_id.json @@ -7,7 +7,7 @@ }, "is_in_otel": false, "example": "123e4567e89b12d3a456426614174000", - "alias": ["replay_id"], + "alias": ["replay_id", "replayId"], "visibility": "public", "search_alias": { "name": "replay.id" diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 3ab9f5d6..8814eb15 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -352,6 +352,7 @@ class _AttributeNamesMeta(type): "REDIS_COMMAND", "REDIS_KEY", "RELEASE", + "REPLAYID", "REPLAY_ID", "RESOURCE_DEPLOYMENT_ENVIRONMENT", "RESOURCE_DEPLOYMENT_ENVIRONMENT_NAME", @@ -8320,6 +8321,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 + Apply Scrubbing: never + 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. @@ -9240,7 +9254,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Apply Scrubbing: never Defined in OTEL: No Visibility: public - Aliases: replay_id + Aliases: replay_id, replayId Example: "123e4567e89b12d3a456426614174000" """ @@ -22725,6 +22739,20 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.1.0", prs=[103]), ], ), + "replayId": AttributeMetadata( + brief="The id of the sentry replay.", + type=AttributeType.STRING, + keys=("replayId",), + apply_scrubbing=ApplyScrubbingInfo(key=ApplyScrubbing.NEVER), + 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, @@ -23975,7 +24003,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"), ], @@ -26850,6 +26878,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "redis.key": str, "release": str, "remix.action_form_data.": str, + "replayId": str, "replay_id": str, "resource.deployment.environment": str, "resource.deployment.environment.name": str,