From 1e1bcc56396e805cca14b1af16bdda6ed0f80752 Mon Sep 17 00:00:00 2001 From: Fabian Schindler Date: Fri, 10 Apr 2026 15:30:01 +0200 Subject: [PATCH] fix(event-schema): Merging `gen_ai.request.messages` into `gen_ai.input.messages` and `gen_ai.response.text` into `gen_ai.output.messages` --- relay-event-schema/src/protocol/span.rs | 34 ++++++------------- .../src/protocol/span/convert.rs | 7 ++-- relay-pii/src/convert.rs | 25 ++++++-------- ...vert__tests__regression_more_odd_keys.snap | 2 +- tests/integration/test_ai.py | 10 +++--- 5 files changed, 30 insertions(+), 48 deletions(-) diff --git a/relay-event-schema/src/protocol/span.rs b/relay-event-schema/src/protocol/span.rs index 90cc716c33..fe90c1e8d2 100644 --- a/relay-event-schema/src/protocol/span.rs +++ b/relay-event-schema/src/protocol/span.rs @@ -553,17 +553,15 @@ pub struct SpanData { #[metastructure(field = "gen_ai.cost.output_tokens", pii = "maybe")] pub gen_ai_cost_output_tokens: Annotated, - /// Prompt passed to LLM (Vercel AI SDK) - #[metastructure(field = "gen_ai.prompt", pii = "maybe")] - pub gen_ai_prompt: Annotated, - - /// Prompt passed to LLM + /// The input messages to the model call. #[metastructure( - field = "gen_ai.request.messages", + field = "gen_ai.input.messages", pii = "maybe", + legacy_alias = "gen_ai.prompt", + legacy_alias = "gen_ai.request.messages", legacy_alias = "ai.prompt.messages" )] - pub gen_ai_request_messages: Annotated, + pub gen_ai_input_messages: Annotated, /// Tool call arguments #[metastructure( @@ -590,14 +588,15 @@ pub struct SpanData { )] pub gen_ai_response_tool_calls: Annotated, - /// LLM response text (Vercel AI, generateText) + /// The output messages from the model call. #[metastructure( - field = "gen_ai.response.text", + field = "gen_ai.output.messages", + legacy_alias = "gen_ai.response.text", legacy_alias = "ai.response.text", legacy_alias = "ai.responses", pii = "maybe" )] - pub gen_ai_response_text: Annotated, + pub gen_ai_output_messages: Annotated, /// LLM response object (Vercel AI, generateObject) #[metastructure(field = "gen_ai.response.object", pii = "maybe")] @@ -700,14 +699,6 @@ pub struct SpanData { #[metastructure(field = "gen_ai.function_id", pii = "maybe")] pub gen_ai_function_id: Annotated, - /// The input messages to the model call. - #[metastructure(field = "gen_ai.input.messages", pii = "maybe")] - pub gen_ai_input_messages: Annotated, - - /// The output messages from the model call. - #[metastructure(field = "gen_ai.output.messages", pii = "maybe")] - pub gen_ai_output_messages: Annotated, - /// The result of the MCP prompt. #[metastructure(field = "mcp.prompt.result", pii = "maybe")] pub mcp_prompt_result: Annotated, @@ -1526,12 +1517,11 @@ mod tests { gen_ai_cost_total_tokens: ~, gen_ai_cost_input_tokens: ~, gen_ai_cost_output_tokens: ~, - gen_ai_prompt: ~, - gen_ai_request_messages: ~, + gen_ai_input_messages: ~, gen_ai_tool_input: ~, gen_ai_tool_output: ~, gen_ai_response_tool_calls: ~, - gen_ai_response_text: ~, + gen_ai_output_messages: ~, gen_ai_response_object: ~, gen_ai_response_streaming: ~, gen_ai_response_tokens_per_second: ~, @@ -1552,8 +1542,6 @@ mod tests { gen_ai_operation_type: ~, gen_ai_agent_name: ~, gen_ai_function_id: ~, - gen_ai_input_messages: ~, - gen_ai_output_messages: ~, mcp_prompt_result: ~, mcp_tool_result_content: ~, browser_name: ~, diff --git a/relay-event-schema/src/protocol/span/convert.rs b/relay-event-schema/src/protocol/span/convert.rs index 82b123673d..813da802b8 100644 --- a/relay-event-schema/src/protocol/span/convert.rs +++ b/relay-event-schema/src/protocol/span/convert.rs @@ -183,12 +183,11 @@ mod tests { gen_ai_cost_total_tokens: ~, gen_ai_cost_input_tokens: ~, gen_ai_cost_output_tokens: ~, - gen_ai_prompt: ~, - gen_ai_request_messages: ~, + gen_ai_input_messages: ~, gen_ai_tool_input: ~, gen_ai_tool_output: ~, gen_ai_response_tool_calls: ~, - gen_ai_response_text: ~, + gen_ai_output_messages: ~, gen_ai_response_object: ~, gen_ai_response_streaming: ~, gen_ai_response_tokens_per_second: ~, @@ -209,8 +208,6 @@ mod tests { gen_ai_operation_type: ~, gen_ai_agent_name: ~, gen_ai_function_id: ~, - gen_ai_input_messages: ~, - gen_ai_output_messages: ~, mcp_prompt_result: ~, mcp_tool_result_content: ~, browser_name: "Chrome", diff --git a/relay-pii/src/convert.rs b/relay-pii/src/convert.rs index a0a523d665..412feac473 100644 --- a/relay-pii/src/convert.rs +++ b/relay-pii/src/convert.rs @@ -83,9 +83,9 @@ static REPLACE_ONLY_SELECTOR: LazyLock = LazyLock::new(|| { [ "$logentry.formatted", "$log.body", - "$span.data.'gen_ai.prompt'", + "$span.data.'gen_ai.input.messages'", + "attributes.'gen_ai.input.messages'.value", "attributes.'gen_ai.prompt'.value", - "$span.data.'gen_ai.request.messages'", "attributes.'gen_ai.request.messages'.value", "$span.data.'gen_ai.tool.input'", "attributes.'gen_ai.tool.input'.value", @@ -93,7 +93,8 @@ static REPLACE_ONLY_SELECTOR: LazyLock = LazyLock::new(|| { "attributes.'gen_ai.tool.output'.value", "$span.data.'gen_ai.response.tool_calls'", "attributes.'gen_ai.response.tool_calls'.value", - "$span.data.'gen_ai.response.text'", + "$span.data.'gen_ai.output.messages'", + "attributes.'gen_ai.output.messages'.value", "attributes.'gen_ai.response.text'.value", "$span.data.'gen_ai.response.object'", "attributes.'gen_ai.response.object'.value", @@ -101,10 +102,6 @@ static REPLACE_ONLY_SELECTOR: LazyLock = LazyLock::new(|| { "attributes.'gen_ai.request.available_tools'.value", "$span.data.'gen_ai.tool.name'", "attributes.'gen_ai.tool.name'.value", - "$span.data.'gen_ai.input.messages'", - "attributes.'gen_ai.input.messages'.value", - "$span.data.'gen_ai.output.messages'", - "attributes.'gen_ai.output.messages'.value", "$span.data.'mcp.prompt.result'", "attributes.'mcp.prompt.result'.value", "$span.data.'mcp.tool.result.content'", @@ -362,7 +359,7 @@ THd+9FBxiHLGXNKhG/FRSyREXEt+NyYIf/0cyByc9tNksat794ddUqnLOg0vwSkv "$http.env.REMOTE_ADDR || $user.ip_address || $sdk.client_ip || $span.sentry_tags.'user.ip'": [ "@anything:remove" ], - "$logentry.formatted || $log.body || $span.data.'gen_ai.prompt' || attributes.'gen_ai.prompt'.value || $span.data.'gen_ai.request.messages' || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.response.text' || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ + "$logentry.formatted || $log.body || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || attributes.'gen_ai.prompt'.value || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ "@email:replace", "@creditcard:replace", "@iban:replace", @@ -394,7 +391,7 @@ THd+9FBxiHLGXNKhG/FRSyREXEt+NyYIf/0cyByc9tNksat794ddUqnLOg0vwSkv "$http.env.REMOTE_ADDR || $user.ip_address || $sdk.client_ip || $span.sentry_tags.'user.ip'": [ "@anything:remove" ], - "$logentry.formatted || $log.body || $span.data.'gen_ai.prompt' || attributes.'gen_ai.prompt'.value || $span.data.'gen_ai.request.messages' || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.response.text' || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ + "$logentry.formatted || $log.body || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || attributes.'gen_ai.prompt'.value || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ "@email:replace", "@creditcard:replace", "@iban:replace", @@ -437,7 +434,7 @@ THd+9FBxiHLGXNKhG/FRSyREXEt+NyYIf/0cyByc9tNksat794ddUqnLOg0vwSkv "$http.env.REMOTE_ADDR || $user.ip_address || $sdk.client_ip || $span.sentry_tags.'user.ip'": [ "@anything:remove" ], - "$logentry.formatted || $log.body || $span.data.'gen_ai.prompt' || attributes.'gen_ai.prompt'.value || $span.data.'gen_ai.request.messages' || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.response.text' || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ + "$logentry.formatted || $log.body || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || attributes.'gen_ai.prompt'.value || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ "@email:replace", "@creditcard:replace", "@iban:replace", @@ -469,7 +466,7 @@ THd+9FBxiHLGXNKhG/FRSyREXEt+NyYIf/0cyByc9tNksat794ddUqnLOg0vwSkv "$http.env.REMOTE_ADDR || $user.ip_address || $sdk.client_ip || $span.sentry_tags.'user.ip'": [ "@anything:remove" ], - "$logentry.formatted || $log.body || $span.data.'gen_ai.prompt' || attributes.'gen_ai.prompt'.value || $span.data.'gen_ai.request.messages' || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.response.text' || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ + "$logentry.formatted || $log.body || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || attributes.'gen_ai.prompt'.value || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ "@email:replace", "@creditcard:replace", "@iban:replace", @@ -1390,7 +1387,7 @@ THd+9FBxiHLGXNKhG/FRSyREXEt+NyYIf/0cyByc9tNksat794ddUqnLOg0vwSkv "$http.env.REMOTE_ADDR || $user.ip_address || $sdk.client_ip || $span.sentry_tags.'user.ip'": [ "@anything:remove" ], - "$logentry.formatted || $log.body || $span.data.'gen_ai.prompt' || attributes.'gen_ai.prompt'.value || $span.data.'gen_ai.request.messages' || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.response.text' || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ + "$logentry.formatted || $log.body || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || attributes.'gen_ai.prompt'.value || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ "@email:replace", "@creditcard:replace", "@iban:replace", @@ -1992,7 +1989,7 @@ THd+9FBxiHLGXNKhG/FRSyREXEt+NyYIf/0cyByc9tNksat794ddUqnLOg0vwSkv "spans": [ { "data": { - "gen_ai.prompt": "Buy me a drink with my creditcard [creditcard]" + "gen_ai.input.messages": "Buy me a drink with my creditcard [creditcard]" } } ], @@ -2000,7 +1997,7 @@ THd+9FBxiHLGXNKhG/FRSyREXEt+NyYIf/0cyByc9tNksat794ddUqnLOg0vwSkv "spans": { "0": { "data": { - "gen_ai.prompt": { + "gen_ai.input.messages": { "": { "rem": [ [ diff --git a/relay-pii/src/snapshots/relay_pii__convert__tests__regression_more_odd_keys.snap b/relay-pii/src/snapshots/relay_pii__convert__tests__regression_more_odd_keys.snap index 94f444fc7f..3356f9c833 100644 --- a/relay-pii/src/snapshots/relay_pii__convert__tests__regression_more_odd_keys.snap +++ b/relay-pii/src/snapshots/relay_pii__convert__tests__regression_more_odd_keys.snap @@ -11,7 +11,7 @@ expression: pii_config "$http.env.REMOTE_ADDR || $user.ip_address || $sdk.client_ip || $span.sentry_tags.'user.ip'": [ "@anything:remove" ], - "$logentry.formatted || $log.body || $span.data.'gen_ai.prompt' || attributes.'gen_ai.prompt'.value || $span.data.'gen_ai.request.messages' || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.response.text' || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ + "$logentry.formatted || $log.body || $span.data.'gen_ai.input.messages' || attributes.'gen_ai.input.messages'.value || attributes.'gen_ai.prompt'.value || attributes.'gen_ai.request.messages'.value || $span.data.'gen_ai.tool.input' || attributes.'gen_ai.tool.input'.value || $span.data.'gen_ai.tool.output' || attributes.'gen_ai.tool.output'.value || $span.data.'gen_ai.response.tool_calls' || attributes.'gen_ai.response.tool_calls'.value || $span.data.'gen_ai.output.messages' || attributes.'gen_ai.output.messages'.value || attributes.'gen_ai.response.text'.value || $span.data.'gen_ai.response.object' || attributes.'gen_ai.response.object'.value || $span.data.'gen_ai.request.available_tools' || attributes.'gen_ai.request.available_tools'.value || $span.data.'gen_ai.tool.name' || attributes.'gen_ai.tool.name'.value || $span.data.'mcp.prompt.result' || attributes.'mcp.prompt.result'.value || $span.data.'mcp.tool.result.content' || attributes.'mcp.tool.result.content'.value": [ "@email:replace", "@creditcard:replace", "@iban:replace", diff --git a/tests/integration/test_ai.py b/tests/integration/test_ai.py index 51c765a3ea..08877e5447 100644 --- a/tests/integration/test_ai.py +++ b/tests/integration/test_ai.py @@ -393,9 +393,9 @@ def test_ai_spans_example_transaction( "gen_ai.agent.name": {"type": "string", "value": "weather-chat"}, "gen_ai.function_id": {"type": "string", "value": "weather-chat"}, "gen_ai.operation.type": {"type": "string", "value": "agent"}, - "gen_ai.prompt": {"type": "string", "value": "Weather Prompt"}, + "gen_ai.input.messages": {"type": "string", "value": "Weather Prompt"}, "gen_ai.response.model": {"type": "string", "value": "gpt-4o"}, - "gen_ai.response.text": { + "gen_ai.output.messages": { "type": "string", "value": "True. \n\n- London: 61°F \n- San Francisco: 13°C", }, @@ -486,7 +486,7 @@ def test_ai_spans_example_transaction( "type": "string", "value": '["tools1"]', }, - "gen_ai.request.messages": { + "gen_ai.input.messages": { "type": "string", "value": "Another weather prompt", }, @@ -975,7 +975,7 @@ def test_ai_spans_example_transaction( "type": "string", "value": '["tool_1"]', }, - "gen_ai.request.messages": { + "gen_ai.input.messages": { "type": "string", "value": "Some AI Prompt about " "the Wheather", }, @@ -992,7 +992,7 @@ def test_ai_spans_example_transaction( "type": "string", "value": "gpt-4o-2024-08-06", }, - "gen_ai.response.text": { + "gen_ai.output.messages": { "type": "string", "value": "True. \n" "\n"