Skip to content

conformance: classify MCP spans before GenAI compatibility matching - #149

Open
Utkarsh-Sinha0 wants to merge 2 commits into
open-telemetry:mainfrom
Utkarsh-Sinha0:fix/mcp-span-conformance-classification
Open

Utkarsh-Sinha0 wants to merge 2 commits into
open-telemetry:mainfrom
Utkarsh-Sinha0:fix/mcp-span-conformance-classification

Conversation

@Utkarsh-Sinha0

Copy link
Copy Markdown

Summary

MCP spans may carry gen_ai.* compatibility attributes. If GenAI operation matching runs first, a valid MCP client or server span can be classified under the wrong registry entry, causing MCP-specific coverage to be lost.

This change:

  • Classifies spans as mcp.client or mcp.server only when mcp.method.name, the corresponding span kind, and the resolved registry definition are present.
  • Preserves existing GenAI fallback behavior for internal spans and registries without MCP definitions.
  • Excludes only MCP-qualified samples from the three GenAI shape checks: span name, expected attributes, and span kind.
  • Retains generic validation and unknown gen_ai.operation.name validation.
  • Changes no registry definitions or registry pin.

Validation

  • Coverage tests: 14 passed.
  • Policy tests: 3 passed.
  • Complete GenAI test suite: 19 passed with Weaver v0.25.1.
  • Ruff: all checks passed.
  • Pyright for the changed classifier source: 0 errors, 0 warnings.
  • Diff whitespace validation: passed.

Any dependent semantic-conventions registry change remains separate.

Related: open-telemetry/semantic-conventions-genai#462

@Utkarsh-Sinha0
Utkarsh-Sinha0 requested a review from a team as a code owner August 30, 2026 19:27
Copilot AI balanced review requested due to automatic review settings August 30, 2026 19:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 30, 2026

Copy link
Copy Markdown

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

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 30, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-09-17 06:53 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants