Skip to content

opentelemetry-instrumentation-openai-agents-v2: handle MCPListToolsSpanData#4629

Closed
Jwrede wants to merge 1 commit into
open-telemetry:mainfrom
Jwrede:fix/mcp-list-tools-span-data
Closed

opentelemetry-instrumentation-openai-agents-v2: handle MCPListToolsSpanData#4629
Jwrede wants to merge 1 commit into
open-telemetry:mainfrom
Jwrede:fix/mcp-list-tools-span-data

Conversation

@Jwrede

@Jwrede Jwrede commented May 26, 2026

Copy link
Copy Markdown
Contributor

Description

Add MCPListToolsSpanData handling to the GenAISemanticProcessor in the OpenAI Agents v2 instrumentation so that MCP tool listing spans are reported with proper operation name, span kind, and attributes instead of showing as "unknown" with no data.

Fixes #4197

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Unit tests for operation name, span kind, span naming, and attribute extraction (with/without server name, with/without tool results)
  • Integration tests via test_tracer.py covering MCP list tools spans with and without results

All 106 tests in the package pass.

Does This PR Require a Core Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated (.changelog/4197.fixed)
  • Unit tests have been added
  • Documentation has been updated

Assisted-by: Claude Opus 4.6

@Jwrede Jwrede requested a review from a team as a code owner May 26, 2026 08:26
@linux-foundation-easycla

linux-foundation-easycla Bot commented May 26, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Jwrede / name: Jonathan Wrede (2235a71)

@github-actions github-actions Bot added the gen-ai Related to generative AI label May 26, 2026
@Jwrede

Jwrede commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@easycla

@Jwrede

Jwrede commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

I have signed the EasyCLA. Please recheck.

…anData

Add MCPListToolsSpanData handling to the GenAISemanticProcessor so MCP
list tools spans are reported with proper operation name, span kind,
and attributes instead of showing as "unknown" with no data.

Assisted-by: Claude Opus 4.6
@Jwrede Jwrede force-pushed the fix/mcp-list-tools-span-data branch from d5cccc3 to 2235a71 Compare May 26, 2026 10:19
@Jwrede

Jwrede commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

/easycla

@lzchen

lzchen commented May 26, 2026

Copy link
Copy Markdown
Contributor

We are no longer accepting genai related PRs in this repo. Please open up your PR in genai repo from now on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gen-ai Related to generative AI

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[OpenAI Agents] MCP List Tools spans show only as "unknown" with no data

2 participants