From 555fcce1fe207330c5662fa7156b1c6769624a59 Mon Sep 17 00:00:00 2001 From: Fabian Schindler Date: Tue, 24 Feb 2026 12:43:48 +0100 Subject: [PATCH] chore(gen_ai): deprecate gen_ai.tool.input, gen_ai.tool.message, gen_ai.tool.output --- .../sentry-conventions/src/attributes.ts | 27 +++++++++++ .../gen_ai/gen_ai__tool__call__arguments.json | 3 +- .../gen_ai/gen_ai__tool__call__result.json | 3 +- .../gen_ai/gen_ai__tool__input.json | 6 ++- .../gen_ai/gen_ai__tool__message.json | 7 ++- .../gen_ai/gen_ai__tool__output.json | 6 ++- python/src/sentry_conventions/attributes.py | 19 ++++++++ shared/deprecated_attributes.json | 45 +++++++++++++++++++ 8 files changed, 111 insertions(+), 5 deletions(-) diff --git a/javascript/sentry-conventions/src/attributes.ts b/javascript/sentry-conventions/src/attributes.ts index ba0a8b59..93366074 100644 --- a/javascript/sentry-conventions/src/attributes.ts +++ b/javascript/sentry-conventions/src/attributes.ts @@ -2831,6 +2831,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'; @@ -2851,6 +2853,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'; @@ -2911,6 +2915,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'; @@ -2931,6 +2938,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'; @@ -2973,6 +2983,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'; @@ -11189,6 +11202,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.', @@ -11198,6 +11212,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.', @@ -11226,6 +11241,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.', @@ -11235,6 +11254,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.', @@ -11254,6 +11277,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 2a2b4330..744df8e7 100644 --- a/python/src/sentry_conventions/attributes.py +++ b/python/src/sentry_conventions/attributes.py @@ -123,6 +123,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", @@ -1664,6 +1667,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta): Type: str Contains PII: maybe Defined in OTEL: Yes + Aliases: gen_ai.tool.input Example: "{\"location\": \"Paris\"}" """ @@ -1676,6 +1680,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" """ @@ -1710,6 +1715,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\"}" """ @@ -1720,6 +1727,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" """ @@ -1741,6 +1750,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" """ @@ -5932,6 +5943,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.", @@ -5939,6 +5951,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.", @@ -5960,6 +5973,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.", @@ -5967,6 +5982,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.", @@ -5982,6 +5999,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 4250cc3f..dbef5a77 100644 --- a/shared/deprecated_attributes.json +++ b/shared/deprecated_attributes.json @@ -668,6 +668,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).",