Skip to content
Closed
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
3 changes: 2 additions & 1 deletion generated/attributes/all.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This page lists all available attributes across all categories.

Total attributes: 424
Total attributes: 425

## Stable Attributes

Expand Down Expand Up @@ -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. |
Expand Down
12 changes: 12 additions & 0 deletions generated/attributes/sentry.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
34 changes: 34 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7169,6 +7169,27 @@ export const SENTRY_SDK_INTEGRATIONS = 'sentry.sdk.integrations';
*/
export type SENTRY_SDK_INTEGRATIONS_TYPE = Array<string>;

// 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

/**
Expand Down Expand Up @@ -9192,6 +9213,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[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',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -13285,6 +13308,16 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
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',
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"key": "sentry.sdk_meta.gen_ai.input.messages.original_length",
Copy link
Member

@Lms24 Lms24 Feb 2, 2026

Choose a reason for hiding this comment

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

(Feel free to disregard, I basically just came across this and wanted to share a thought)

I don't wanna stir up too much bike shedding here but did we settle on this name yet?

As in: is sentry.sdk_meta the "namespace" we want to use for (I guess) annotating other, non-sentry, attributes? I'd like us to just take a moment here and think this through because this name is very long and nested. I don't have enough context around AI monitoring to popose a well thought through alternative but at least a bit shorter and less nested:

sentry.meta.gen_ai_input_messages.original_length

My primary concern here is the product showing nested keys in nested levels. So maybe we remove the . from the original attribute name to also indicate that this attribute describes the very attribute in its name?

Image

(Nesting example)

Copy link
Member Author

Choose a reason for hiding this comment

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

Hey, yeah I share a lot of the same concerns but we agreed on this already and sdks actually already implement it. You are right, this is very nested but we wanted it to relate to the original attribute (in this case it is already non-short gen_ai.input.messages) :/

Product nesting looks ok though:
image

Copy link
Member

Choose a reason for hiding this comment

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

I think ideally we/SDKs secure a namesapce for such information and possibly their own format/spec, then we hide the entire namespace in the UI by default and render it nicely.

"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
}
20 changes: 20 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading