Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#### Changes to attributes

- fix(attributes): improve gen_ai.operation.name description ([#225](https://github.com/getsentry/sentry-conventions/pull/225))
- feat(ai): Add gen_ai.usage.input_tokens.cache_write ([#217](https://github.com/getsentry/sentry-conventions/pull/217))
- feat(attributes): Add sentry.normalized_db_query.hash ([#200](https://github.com/getsentry/sentry-conventions/pull/200))
- feat(attributes): Add sentry.category attribute ([#218](https://github.com/getsentry/sentry-conventions/pull/218))
Expand Down
2 changes: 1 addition & 1 deletion generated/attributes/all.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Total attributes: 422
| [`gen_ai.cost.total_tokens`](./gen_ai.md#gen_aicosttotal_tokens) | The total cost for the tokens used. |
| [`gen_ai.embeddings.input`](./gen_ai.md#gen_aiembeddingsinput) | The input to the embeddings model. |
| [`gen_ai.input.messages`](./gen_ai.md#gen_aiinputmessages) | The messages passed to the model. It has to be a stringified version of an array of objects. The `role` attribute of each object must be `"user"`, `"assistant"`, `"tool"`, or `"system"`. For messages of the role `"tool"`, the `content` can be a string or an arbitrary object with information about the tool call. For other messages the `content` can be either a string or a list of objects in the format `{type: "text", text:"..."}`. |
| [`gen_ai.operation.name`](./gen_ai.md#gen_aioperationname) | The name of the operation being performed. |
| [`gen_ai.operation.name`](./gen_ai.md#gen_aioperationname) | The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used. |
| [`gen_ai.operation.type`](./gen_ai.md#gen_aioperationtype) | The type of AI operation. Must be one of 'agent', 'ai_client', 'tool', 'handoff', 'guardrail'. Makes querying for spans in the UI easier. |
| [`gen_ai.output.messages`](./gen_ai.md#gen_aioutputmessages) | The model's response messages. It has to be a stringified version of an array of message objects, which can include text responses and tool calls. |
| [`gen_ai.pipeline.name`](./gen_ai.md#gen_aipipelinename) | Name of the AI pipeline or chain being executed. |
Expand Down
2 changes: 1 addition & 1 deletion generated/attributes/gen_ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ The messages passed to the model. It has to be a stringified version of an array

### gen_ai.operation.name

The name of the operation being performed.
The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.

| Property | Value |
| --- | --- |
Expand Down
5 changes: 3 additions & 2 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2168,7 +2168,7 @@ export type GEN_AI_INPUT_MESSAGES_TYPE = string;
// Path: model/attributes/gen_ai/gen_ai__operation__name.json

/**
* The name of the operation being performed. `gen_ai.operation.name`
* The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used. `gen_ai.operation.name`
*
* Attribute Value Type: `string` {@link GEN_AI_OPERATION_NAME_TYPE}
*
Expand Down Expand Up @@ -10767,7 +10767,8 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
'[{"role": "user", "parts": [{"type": "text", "content": "Weather in Paris?"}]}, {"role": "assistant", "parts": [{"type": "tool_call", "id": "call_VSPygqKTWdrhaFErNvMV18Yl", "name": "get_weather", "arguments": {"location": "Paris"}}]}, {"role": "tool", "parts": [{"type": "tool_call_response", "id": "call_VSPygqKTWdrhaFErNvMV18Yl", "result": "rainy, 57°F"}]}]',
},
[GEN_AI_OPERATION_NAME]: {
brief: 'The name of the operation being performed.',
brief:
"The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.",
type: 'string',
pii: {
isPii: 'maybe',
Expand Down
2 changes: 1 addition & 1 deletion model/attributes/gen_ai/gen_ai__operation__name.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"key": "gen_ai.operation.name",
"brief": "The name of the operation being performed.",
"brief": "The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.",
"type": "string",
"pii": {
"key": "maybe"
Expand Down
4 changes: 2 additions & 2 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):

# Path: model/attributes/gen_ai/gen_ai__operation__name.json
GEN_AI_OPERATION_NAME: Literal["gen_ai.operation.name"] = "gen_ai.operation.name"
"""The name of the operation being performed.
"""The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.

Type: str
Contains PII: maybe
Expand Down Expand Up @@ -5646,7 +5646,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
example='[{"role": "user", "parts": [{"type": "text", "content": "Weather in Paris?"}]}, {"role": "assistant", "parts": [{"type": "tool_call", "id": "call_VSPygqKTWdrhaFErNvMV18Yl", "name": "get_weather", "arguments": {"location": "Paris"}}]}, {"role": "tool", "parts": [{"type": "tool_call_response", "id": "call_VSPygqKTWdrhaFErNvMV18Yl", "result": "rainy, 57°F"}]}]',
),
"gen_ai.operation.name": AttributeMetadata(
brief="The name of the operation being performed.",
brief="The name of the operation being performed. It has the following list of well-known values: 'chat', 'create_agent', 'embeddings', 'execute_tool', 'generate_content', 'invoke_agent', 'text_completion'. If one of them applies, then that value MUST be used. Otherwise a custom value MAY be used.",
type=AttributeType.STRING,
pii=PiiInfo(isPii=IsPii.MAYBE),
is_in_otel=True,
Expand Down
Loading