diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index a19d2588..11e65411 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -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'; @@ -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'; @@ -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'; @@ -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'; @@ -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'; @@ -11261,6 +11274,7 @@ export const ATTRIBUTE_METADATA: Record = { }, 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.', @@ -11270,6 +11284,7 @@ export const ATTRIBUTE_METADATA: Record = { }, 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.', @@ -11298,6 +11313,10 @@ export const ATTRIBUTE_METADATA: Record = { }, 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.', @@ -11307,6 +11326,10 @@ export const ATTRIBUTE_METADATA: Record = { }, 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.', @@ -11326,6 +11349,10 @@ export const ATTRIBUTE_METADATA: Record = { }, 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.', diff --git a/model/attributes/gen_ai/gen_ai__tool__call__arguments.json b/model/attributes/gen_ai/gen_ai__tool__call__arguments.json index 1d9892cf..0b34d7eb 100644 --- a/model/attributes/gen_ai/gen_ai__tool__call__arguments.json +++ b/model/attributes/gen_ai/gen_ai__tool__call__arguments.json @@ -6,5 +6,6 @@ "key": "maybe" }, "is_in_otel": true, - "example": "{\"location\": \"Paris\"}" + "example": "{\"location\": \"Paris\"}", + "alias": ["gen_ai.tool.input"] } diff --git a/model/attributes/gen_ai/gen_ai__tool__call__result.json b/model/attributes/gen_ai/gen_ai__tool__call__result.json index 724f62b0..2c48578a 100644 --- a/model/attributes/gen_ai/gen_ai__tool__call__result.json +++ b/model/attributes/gen_ai/gen_ai__tool__call__result.json @@ -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"] } diff --git a/model/attributes/gen_ai/gen_ai__tool__input.json b/model/attributes/gen_ai/gen_ai__tool__input.json index 8fddd390..83970199 100644 --- a/model/attributes/gen_ai/gen_ai__tool__input.json +++ b/model/attributes/gen_ai/gen_ai__tool__input.json @@ -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" + } } diff --git a/model/attributes/gen_ai/gen_ai__tool__message.json b/model/attributes/gen_ai/gen_ai__tool__message.json index 21e85669..869ebad9 100644 --- a/model/attributes/gen_ai/gen_ai__tool__message.json +++ b/model/attributes/gen_ai/gen_ai__tool__message.json @@ -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" + } } diff --git a/model/attributes/gen_ai/gen_ai__tool__output.json b/model/attributes/gen_ai/gen_ai__tool__output.json index e8ee0c20..c6c4e8dc 100644 --- a/model/attributes/gen_ai/gen_ai__tool__output.json +++ b/model/attributes/gen_ai/gen_ai__tool__output.json @@ -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" + } } diff --git a/python/src/sentry_conventions/attributes.py b/python/src/sentry_conventions/attributes.py index 01356ef9..240fc646 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -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", @@ -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\"}" """ @@ -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" """ @@ -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\"}" """ @@ -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" """ @@ -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" """ @@ -5995,6 +6006,7 @@ 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.", @@ -6002,6 +6014,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): 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.", @@ -6023,6 +6036,8 @@ 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.", @@ -6030,6 +6045,8 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): 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.", @@ -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.", diff --git a/shared/deprecated_attributes.json b/shared/deprecated_attributes.json index 65709e8a..a5a86222 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -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).",