diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 9690ba2b..e4e72f9b 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -7471,6 +7471,26 @@ export const SENTRY_STATUS_MESSAGE = 'sentry.status.message'; */ export type SENTRY_STATUS_MESSAGE_TYPE = string; +// Path: model/attributes/sentry/sentry__timestamp__sequence.json + +/** + * A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one. `sentry.timestamp.sequence` + * + * Attribute Value Type: `number` {@link SENTRY_TIMESTAMP_SEQUENCE_TYPE} + * + * Contains PII: false + * + * Attribute defined in OTEL: No + * + * @example 0 + */ +export const SENTRY_TIMESTAMP_SEQUENCE = 'sentry.timestamp.sequence'; + +/** + * Type for {@link SENTRY_TIMESTAMP_SEQUENCE} sentry.timestamp.sequence + */ +export type SENTRY_TIMESTAMP_SEQUENCE_TYPE = number; + // Path: model/attributes/sentry/sentry__trace__parent_span_id.json /** @@ -9334,6 +9354,7 @@ export const ATTRIBUTE_TYPE: Record = { [SENTRY_SPAN_SOURCE]: 'string', [SENTRY_STATUS_CODE]: 'integer', [SENTRY_STATUS_MESSAGE]: 'string', + [SENTRY_TIMESTAMP_SEQUENCE]: 'integer', [SENTRY_TRACE_PARENT_SPAN_ID]: 'string', [SENTRY_TRANSACTION]: 'string', [SERVER_ADDRESS]: 'string', @@ -9765,6 +9786,7 @@ export type AttributeName = | typeof SENTRY_SPAN_SOURCE | typeof SENTRY_STATUS_CODE | typeof SENTRY_STATUS_MESSAGE + | typeof SENTRY_TIMESTAMP_SEQUENCE | typeof SENTRY_TRACE_PARENT_SPAN_ID | typeof SENTRY_TRANSACTION | typeof SERVER_ADDRESS @@ -14145,6 +14167,17 @@ export const ATTRIBUTE_METADATA: Record = { example: 'foobar', changelog: [{ version: '0.3.1', prs: [190] }], }, + [SENTRY_TIMESTAMP_SEQUENCE]: { + brief: + 'A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one.', + type: 'integer', + pii: { + isPii: 'false', + }, + isInOtel: false, + example: 0, + changelog: [{ version: 'next', prs: [262] }], + }, [SENTRY_TRACE_PARENT_SPAN_ID]: { brief: 'The span id of the span that was active when the log was collected. This should not be set if there was no active span.', @@ -15259,6 +15292,7 @@ export type Attributes = { [SENTRY_SPAN_SOURCE]?: SENTRY_SPAN_SOURCE_TYPE; [SENTRY_STATUS_CODE]?: SENTRY_STATUS_CODE_TYPE; [SENTRY_STATUS_MESSAGE]?: SENTRY_STATUS_MESSAGE_TYPE; + [SENTRY_TIMESTAMP_SEQUENCE]?: SENTRY_TIMESTAMP_SEQUENCE_TYPE; [SENTRY_TRACE_PARENT_SPAN_ID]?: SENTRY_TRACE_PARENT_SPAN_ID_TYPE; [SENTRY_TRANSACTION]?: SENTRY_TRANSACTION_TYPE; [SERVER_ADDRESS]?: SERVER_ADDRESS_TYPE; diff --git a/model/attributes/sentry/sentry__timestamp__sequence.json b/model/attributes/sentry/sentry__timestamp__sequence.json new file mode 100644 index 00000000..2863458d --- /dev/null +++ b/model/attributes/sentry/sentry__timestamp__sequence.json @@ -0,0 +1,16 @@ +{ + "key": "sentry.timestamp.sequence", + "brief": "A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one.", + "type": "integer", + "pii": { + "key": "false" + }, + "is_in_otel": false, + "example": 0, + "changelog": [ + { + "version": "next", + "prs": [262] + } + ] +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index f49af2ce..0f2c980e 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4199,6 +4199,18 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: 200 """ + # Path: model/attributes/sentry/sentry__timestamp__sequence.json + SENTRY_TIMESTAMP_SEQUENCE: Literal["sentry.timestamp.sequence"] = ( + "sentry.timestamp.sequence" + ) + """A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one. + + Type: int + Contains PII: false + Defined in OTEL: No + Example: 0 + """ + # Path: model/attributes/sentry/sentry__trace__parent_span_id.json SENTRY_TRACE_PARENT_SPAN_ID: Literal["sentry.trace.parent_span_id"] = ( "sentry.trace.parent_span_id" @@ -9114,6 +9126,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): ChangelogEntry(version="0.4.0", prs=[223, 228]), ], ), + "sentry.timestamp.sequence": AttributeMetadata( + brief="A sequencing counter for deterministic ordering of logs or metrics when timestamps share the same integer millisecond. Starts at 0 on SDK initialization, increments by 1 for each captured item, and resets to 0 when the integer millisecond of the current item differs from the previous one.", + type=AttributeType.INTEGER, + pii=PiiInfo(isPii=IsPii.FALSE), + is_in_otel=False, + example=0, + changelog=[ + ChangelogEntry(version="next", prs=[262]), + ], + ), "sentry.trace.parent_span_id": AttributeMetadata( brief="The span id of the span that was active when the log was collected. This should not be set if there was no active span.", type=AttributeType.STRING, @@ -10229,6 +10251,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "sentry.span.source": str, "sentry.status.message": str, "sentry.status_code": int, + "sentry.timestamp.sequence": int, "sentry.trace.parent_span_id": str, "sentry.transaction": str, "server.address": str,