Skip to content

Conversation

@M-Hietala
Copy link
Contributor

change tool call types in traces to use api definitions

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the telemetry/tracing instrumentation to use API-defined type names for tool calls instead of generic mapped types. Previously, the code was mapping API types like function_call to function, file_search_call to file_search, etc. Now it uses the actual API type names directly in traces, improving consistency and clarity.

Key Changes

  • Tool call types in traces now use API definitions (e.g., function_call instead of function, function_call_output instead of function)
  • Similar changes applied to all tool call types: file_search_call, code_interpreter_call, web_search_call, azure_ai_search_call, image_generation_call, mcp_call, and computer_call
  • Test expectations updated to reflect the new type naming convention

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
sdk/ai/azure-ai-projects/azure/ai/projects/telemetry/_responses_instrumentor.py Removed type mapping logic that converted API types to generic types; now uses item_type directly for all tool calls and outputs
sdk/ai/azure-ai-projects/tests/agents/telemetry/test_responses_instrumentor.py Updated test expectations to use API type names (function_call, function_call_output) in trace event content assertions
sdk/ai/azure-ai-projects/tests/agents/telemetry/test_responses_instrumentor_async.py Updated async test expectations to match the new API type naming convention
sdk/ai/azure-ai-projects/CHANGELOG.md Added changelog entry describing the change (with a typo: "defintions" should be "definitions")

@M-Hietala M-Hietala merged commit ca69f0c into main Dec 11, 2025
20 checks passed
@M-Hietala M-Hietala deleted the m-hietala/updating_tool_traces_to_use_api_definitions branch December 11, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants