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
27 changes: 27 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2856,6 +2856,8 @@ export type GEN_AI_SYSTEM_MESSAGE_TYPE = string;
*
* Attribute defined in OTEL: Yes
*
* Aliases: {@link GEN_AI_TOOL_INPUT} `gen_ai.tool.input`
*
* @example "{\"location\": \"Paris\"}"
*/
export const GEN_AI_TOOL_CALL_ARGUMENTS = 'gen_ai.tool.call.arguments';
Expand All @@ -2876,6 +2878,8 @@ export type GEN_AI_TOOL_CALL_ARGUMENTS_TYPE = string;
*
* Attribute defined in OTEL: Yes
*
* Aliases: {@link GEN_AI_TOOL_OUTPUT} `gen_ai.tool.output`, {@link GEN_AI_TOOL_MESSAGE} `gen_ai.tool.message`
*
* @example "rainy, 57°F"
*/
export const GEN_AI_TOOL_CALL_RESULT = 'gen_ai.tool.call.result';
Expand Down Expand Up @@ -2936,6 +2940,9 @@ export type GEN_AI_TOOL_DESCRIPTION_TYPE = string;
*
* Attribute defined in OTEL: No
*
* Aliases: {@link GEN_AI_TOOL_CALL_ARGUMENTS} `gen_ai.tool.call.arguments`
*
* @deprecated Use {@link GEN_AI_TOOL_CALL_ARGUMENTS} (gen_ai.tool.call.arguments) instead
* @example "{\"location\": \"Paris\"}"
*/
export const GEN_AI_TOOL_INPUT = 'gen_ai.tool.input';
Expand All @@ -2956,6 +2963,9 @@ export type GEN_AI_TOOL_INPUT_TYPE = string;
*
* Attribute defined in OTEL: No
*
* Aliases: {@link GEN_AI_TOOL_CALL_RESULT} `gen_ai.tool.call.result`, {@link GEN_AI_TOOL_OUTPUT} `gen_ai.tool.output`
*
* @deprecated Use {@link GEN_AI_TOOL_CALL_RESULT} (gen_ai.tool.call.result) instead
* @example "rainy, 57°F"
*/
export const GEN_AI_TOOL_MESSAGE = 'gen_ai.tool.message';
Expand Down Expand Up @@ -2998,6 +3008,9 @@ export type GEN_AI_TOOL_NAME_TYPE = string;
*
* Attribute defined in OTEL: No
*
* Aliases: {@link GEN_AI_TOOL_CALL_RESULT} `gen_ai.tool.call.result`, {@link GEN_AI_TOOL_MESSAGE} `gen_ai.tool.message`
*
* @deprecated Use {@link GEN_AI_TOOL_CALL_RESULT} (gen_ai.tool.call.result) instead
* @example "rainy, 57°F"
*/
export const GEN_AI_TOOL_OUTPUT = 'gen_ai.tool.output';
Expand Down Expand Up @@ -11261,6 +11274,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
},
isInOtel: true,
example: '{"location": "Paris"}',
aliases: [GEN_AI_TOOL_INPUT],
},
[GEN_AI_TOOL_CALL_RESULT]: {
brief: 'The result of the tool call. It has to be a stringified version of the result of the tool.',
Expand All @@ -11270,6 +11284,7 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
},
isInOtel: true,
example: 'rainy, 57°F',
aliases: [GEN_AI_TOOL_OUTPUT, GEN_AI_TOOL_MESSAGE],
},
[GEN_AI_TOOL_DEFINITIONS]: {
brief: 'The list of source system tool definitions available to the GenAI agent or model.',
Expand Down Expand Up @@ -11298,6 +11313,10 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
},
isInOtel: false,
example: '{"location": "Paris"}',
deprecation: {
replacement: 'gen_ai.tool.call.arguments',
},
aliases: [GEN_AI_TOOL_CALL_ARGUMENTS],
},
[GEN_AI_TOOL_MESSAGE]: {
brief: 'The response from a tool or function call passed to the model.',
Expand All @@ -11307,6 +11326,10 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
},
isInOtel: false,
example: 'rainy, 57°F',
deprecation: {
replacement: 'gen_ai.tool.call.result',
},
aliases: [GEN_AI_TOOL_CALL_RESULT, GEN_AI_TOOL_OUTPUT],
},
[GEN_AI_TOOL_NAME]: {
brief: 'Name of the tool utilized by the agent.',
Expand All @@ -11326,6 +11349,10 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
},
isInOtel: false,
example: 'rainy, 57°F',
deprecation: {
replacement: 'gen_ai.tool.call.result',
},
aliases: [GEN_AI_TOOL_CALL_RESULT, GEN_AI_TOOL_MESSAGE],
},
[GEN_AI_TOOL_TYPE]: {
brief: 'The type of tool being used.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"key": "maybe"
},
"is_in_otel": true,
"example": "{\"location\": \"Paris\"}"
"example": "{\"location\": \"Paris\"}",
"alias": ["gen_ai.tool.input"]
}
3 changes: 2 additions & 1 deletion model/attributes/gen_ai/gen_ai__tool__call__result.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"key": "maybe"
},
"is_in_otel": true,
"example": "rainy, 57°F"
"example": "rainy, 57°F",
"alias": ["gen_ai.tool.output", "gen_ai.tool.message"]
}
6 changes: 5 additions & 1 deletion model/attributes/gen_ai/gen_ai__tool__input.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
},
"is_in_otel": false,
"example": "{\"location\": \"Paris\"}",
"alias": []
"alias": ["gen_ai.tool.call.arguments"],
"deprecation": {
"_status": null,
"replacement": "gen_ai.tool.call.arguments"
}
}
7 changes: 6 additions & 1 deletion model/attributes/gen_ai/gen_ai__tool__message.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"key": "true"
},
"is_in_otel": false,
"example": "rainy, 57°F"
"example": "rainy, 57°F",
"alias": ["gen_ai.tool.call.result", "gen_ai.tool.output"],
"deprecation": {
"_status": null,
"replacement": "gen_ai.tool.call.result"
}
}
6 changes: 5 additions & 1 deletion model/attributes/gen_ai/gen_ai__tool__output.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
},
"is_in_otel": false,
"example": "rainy, 57°F",
"alias": []
"alias": ["gen_ai.tool.call.result", "gen_ai.tool.message"],
"deprecation": {
"_status": null,
"replacement": "gen_ai.tool.call.result"
}
}
19 changes: 19 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ class _AttributeNamesMeta(type):
"GEN_AI_RESPONSE_TOOL_CALLS",
"GEN_AI_SYSTEM",
"GEN_AI_SYSTEM_MESSAGE",
"GEN_AI_TOOL_INPUT",
"GEN_AI_TOOL_MESSAGE",
"GEN_AI_TOOL_OUTPUT",
"GEN_AI_USAGE_COMPLETION_TOKENS",
"GEN_AI_USAGE_PROMPT_TOKENS",
"HTTP_CLIENT_IP",
Expand Down Expand Up @@ -1696,6 +1699,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: gen_ai.tool.input
Example: "{\"location\": \"Paris\"}"
"""

Expand All @@ -1708,6 +1712,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Type: str
Contains PII: maybe
Defined in OTEL: Yes
Aliases: gen_ai.tool.output, gen_ai.tool.message
Example: "rainy, 57°F"
"""

Expand Down Expand Up @@ -1742,6 +1747,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.tool.call.arguments
DEPRECATED: Use gen_ai.tool.call.arguments instead
Example: "{\"location\": \"Paris\"}"
"""

Expand All @@ -1752,6 +1759,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Type: str
Contains PII: true
Defined in OTEL: No
Aliases: gen_ai.tool.call.result, gen_ai.tool.output
DEPRECATED: Use gen_ai.tool.call.result instead
Example: "rainy, 57°F"
"""

Expand All @@ -1773,6 +1782,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Type: str
Contains PII: maybe
Defined in OTEL: No
Aliases: gen_ai.tool.call.result, gen_ai.tool.message
DEPRECATED: Use gen_ai.tool.call.result instead
Example: "rainy, 57°F"
"""

Expand Down Expand Up @@ -5995,13 +6006,15 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
pii=PiiInfo(isPii=IsPii.MAYBE),
is_in_otel=True,
example='{"location": "Paris"}',
aliases=["gen_ai.tool.input"],
),
"gen_ai.tool.call.result": AttributeMetadata(
brief="The result of the tool call. It has to be a stringified version of the result of the tool.",
type=AttributeType.STRING,
pii=PiiInfo(isPii=IsPii.MAYBE),
is_in_otel=True,
example="rainy, 57°F",
aliases=["gen_ai.tool.output", "gen_ai.tool.message"],
),
"gen_ai.tool.definitions": AttributeMetadata(
brief="The list of source system tool definitions available to the GenAI agent or model.",
Expand All @@ -6023,13 +6036,17 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
pii=PiiInfo(isPii=IsPii.MAYBE),
is_in_otel=False,
example='{"location": "Paris"}',
deprecation=DeprecationInfo(replacement="gen_ai.tool.call.arguments"),
aliases=["gen_ai.tool.call.arguments"],
),
"gen_ai.tool.message": AttributeMetadata(
brief="The response from a tool or function call passed to the model.",
type=AttributeType.STRING,
pii=PiiInfo(isPii=IsPii.TRUE),
is_in_otel=False,
example="rainy, 57°F",
deprecation=DeprecationInfo(replacement="gen_ai.tool.call.result"),
aliases=["gen_ai.tool.call.result", "gen_ai.tool.output"],
),
"gen_ai.tool.name": AttributeMetadata(
brief="Name of the tool utilized by the agent.",
Expand All @@ -6045,6 +6062,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
pii=PiiInfo(isPii=IsPii.MAYBE),
is_in_otel=False,
example="rainy, 57°F",
deprecation=DeprecationInfo(replacement="gen_ai.tool.call.result"),
aliases=["gen_ai.tool.call.result", "gen_ai.tool.message"],
),
"gen_ai.tool.type": AttributeMetadata(
brief="The type of tool being used.",
Expand Down
45 changes: 45 additions & 0 deletions shared/deprecated_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,51 @@
"replacement": "gen_ai.system_instructions"
}
},
{
"key": "gen_ai.tool.input",
"brief": "The input of the tool being used. It has to be a stringified version of the input to the tool.",
"type": "string",
"pii": {
"key": "maybe"
},
"is_in_otel": false,
"example": "{\"location\": \"Paris\"}",
"alias": ["gen_ai.tool.call.arguments"],
"deprecation": {
"_status": null,
"replacement": "gen_ai.tool.call.arguments"
}
},
{
"key": "gen_ai.tool.message",
"brief": "The response from a tool or function call passed to the model.",
"type": "string",
"pii": {
"key": "true"
},
"is_in_otel": false,
"example": "rainy, 57°F",
"alias": ["gen_ai.tool.call.result", "gen_ai.tool.output"],
"deprecation": {
"_status": null,
"replacement": "gen_ai.tool.call.result"
}
},
{
"key": "gen_ai.tool.output",
"brief": "The output of the tool being used. It has to be a stringified version of the output of the tool.",
"type": "string",
"pii": {
"key": "maybe"
},
"is_in_otel": false,
"example": "rainy, 57°F",
"alias": ["gen_ai.tool.call.result", "gen_ai.tool.message"],
"deprecation": {
"_status": null,
"replacement": "gen_ai.tool.call.result"
}
},
{
"key": "gen_ai.usage.completion_tokens",
"brief": "The number of tokens used in the GenAI response (completion).",
Expand Down
Loading