diff --git a/generated/attributes/all.md b/generated/attributes/all.md index 4dd6efa..d5819fe 100644 --- a/generated/attributes/all.md +++ b/generated/attributes/all.md @@ -4,7 +4,7 @@ This page lists all available attributes across all categories. -Total attributes: 424 +Total attributes: 425 ## Stable Attributes @@ -278,6 +278,7 @@ Total attributes: 424 | [`sentry.release`](./sentry.md#sentryrelease) | The sentry release. | | [`sentry.replay_id`](./sentry.md#sentryreplay_id) | The id of the sentry replay. | | [`sentry.replay_is_buffering`](./sentry.md#sentryreplay_is_buffering) | A sentinel attribute on log events indicating whether the current Session Replay is being buffered (onErrorSampleRate). | +| [`sentry.sdk_meta.gen_ai.input.messages.original_length`](./sentry.md#sentrysdk_metagen_aiinputmessagesoriginal_length) | The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s). | | [`sentry.sdk.integrations`](./sentry.md#sentrysdkintegrations) | A list of names identifying enabled integrations. The list shouldhave all enabled integrations, including default integrations. Defaultintegrations are included because different SDK releases may contain differentdefault integrations. | | [`sentry.sdk.name`](./sentry.md#sentrysdkname) | The sentry sdk name. | | [`sentry.sdk.version`](./sentry.md#sentrysdkversion) | The sentry sdk version. | diff --git a/generated/attributes/sentry.md b/generated/attributes/sentry.md index fd06080..5335479 100644 --- a/generated/attributes/sentry.md +++ b/generated/attributes/sentry.md @@ -42,6 +42,7 @@ - [sentry.release](#sentryrelease) - [sentry.replay_id](#sentryreplay_id) - [sentry.replay_is_buffering](#sentryreplay_is_buffering) + - [sentry.sdk_meta.gen_ai.input.messages.original_length](#sentrysdk_metagen_aiinputmessagesoriginal_length) - [sentry.sdk.integrations](#sentrysdkintegrations) - [sentry.sdk.name](#sentrysdkname) - [sentry.sdk.version](#sentrysdkversion) @@ -492,6 +493,17 @@ A sentinel attribute on log events indicating whether the current Session Replay | Exists in OpenTelemetry | No | | Example | `true` | +### sentry.sdk_meta.gen_ai.input.messages.original_length + +The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s). + +| Property | Value | +| --- | --- | +| Type | `integer` | +| Has PII | maybe | +| Exists in OpenTelemetry | No | +| Example | `5` | + ### sentry.sdk.integrations A list of names identifying enabled integrations. The list shouldhave all enabled integrations, including default integrations. Defaultintegrations are included because different SDK releases may contain differentdefault integrations. diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index 4bd9d9f..5aa584a 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -7169,6 +7169,27 @@ export const SENTRY_SDK_INTEGRATIONS = 'sentry.sdk.integrations'; */ export type SENTRY_SDK_INTEGRATIONS_TYPE = Array; +// Path: model/attributes/sentry/sentry__sdk_meta__gen_ai__input__messages__original_length.json + +/** + * The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s). `sentry.sdk_meta.gen_ai.input.messages.original_length` + * + * Attribute Value Type: `number` {@link SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_TYPE} + * + * Contains PII: maybe + * + * Attribute defined in OTEL: No + * + * @example 5 + */ +export const SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH = + 'sentry.sdk_meta.gen_ai.input.messages.original_length'; + +/** + * Type for {@link SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH} sentry.sdk_meta.gen_ai.input.messages.original_length + */ +export type SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_TYPE = number; + // Path: model/attributes/sentry/sentry__sdk__name.json /** @@ -9192,6 +9213,7 @@ export const ATTRIBUTE_TYPE: Record = { [SENTRY_REPLAY_ID]: 'string', [SENTRY_REPLAY_IS_BUFFERING]: 'boolean', [SENTRY_SDK_INTEGRATIONS]: 'string[]', + [SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH]: 'integer', [SENTRY_SDK_NAME]: 'string', [SENTRY_SDK_VERSION]: 'string', [SENTRY_SEGMENT_ID]: 'string', @@ -9619,6 +9641,7 @@ export type AttributeName = | typeof SENTRY_REPLAY_ID | typeof SENTRY_REPLAY_IS_BUFFERING | typeof SENTRY_SDK_INTEGRATIONS + | typeof SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH | typeof SENTRY_SDK_NAME | typeof SENTRY_SDK_VERSION | typeof SENTRY_SEGMENT_ID @@ -13285,6 +13308,16 @@ export const ATTRIBUTE_METADATA: Record = { isInOtel: false, example: ['InboundFilters', 'FunctionToString', 'BrowserApiErrors', 'Breadcrumbs'], }, + [SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH]: { + brief: + 'The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s).', + type: 'integer', + pii: { + isPii: 'maybe', + }, + isInOtel: false, + example: 5, + }, [SENTRY_SDK_NAME]: { brief: 'The sentry sdk name.', type: 'string', @@ -14391,6 +14424,7 @@ export type Attributes = { [SENTRY_REPLAY_ID]?: SENTRY_REPLAY_ID_TYPE; [SENTRY_REPLAY_IS_BUFFERING]?: SENTRY_REPLAY_IS_BUFFERING_TYPE; [SENTRY_SDK_INTEGRATIONS]?: SENTRY_SDK_INTEGRATIONS_TYPE; + [SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH]?: SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_TYPE; [SENTRY_SDK_NAME]?: SENTRY_SDK_NAME_TYPE; [SENTRY_SDK_VERSION]?: SENTRY_SDK_VERSION_TYPE; [SENTRY_SEGMENT_ID]?: SENTRY_SEGMENT_ID_TYPE; diff --git a/model/attributes/sentry/sentry__sdk_meta__gen_ai__input__messages__original_length.json b/model/attributes/sentry/sentry__sdk_meta__gen_ai__input__messages__original_length.json new file mode 100644 index 0000000..cc0f474 --- /dev/null +++ b/model/attributes/sentry/sentry__sdk_meta__gen_ai__input__messages__original_length.json @@ -0,0 +1,10 @@ +{ + "key": "sentry.sdk_meta.gen_ai.input.messages.original_length", + "brief": "The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s).", + "type": "integer", + "pii": { + "key": "maybe" + }, + "is_in_otel": false, + "example": 5 +} diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index cb13586..4e80c3f 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -4018,6 +4018,18 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Example: "7.0.0" """ + # Path: model/attributes/sentry/sentry__sdk_meta__gen_ai__input__messages__original_length.json + SENTRY_SDK_META_GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH: Literal[ + "sentry.sdk_meta.gen_ai.input.messages.original_length" + ] = "sentry.sdk_meta.gen_ai.input.messages.original_length" + """The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s). + + Type: int + Contains PII: maybe + Defined in OTEL: No + Example: 5 + """ + # Path: model/attributes/sentry/sentry__segment__id.json SENTRY_SEGMENT_ID: Literal["sentry.segment.id"] = "sentry.segment.id" """The segment ID of a span @@ -7572,6 +7584,13 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): is_in_otel=False, example="7.0.0", ), + "sentry.sdk_meta.gen_ai.input.messages.original_length": AttributeMetadata( + brief="The original length of gen_ai.input.messages before any truncation or modification. This refers to the amount of messages in the array, not the length of the message string(s).", + type=AttributeType.INTEGER, + pii=PiiInfo(isPii=IsPii.MAYBE), + is_in_otel=False, + example=5, + ), "sentry.segment.id": AttributeMetadata( brief="The segment ID of a span", type=AttributeType.STRING, @@ -8497,6 +8516,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): "sentry.sdk.integrations": List[str], "sentry.sdk.name": str, "sentry.sdk.version": str, + "sentry.sdk_meta.gen_ai.input.messages.original_length": int, "sentry.segment.id": str, "sentry.segment.name": str, "sentry.segment_id": str,