Skip to content

Version-aware OTel GenAI semconv normalization #162

Description

@krisztianfekete

Problem or motivation

The OTel GenAI semantic conventions churn across releases. Our extraction is written against the latest attribute names, so traces emitted against older or newer spec versions can silently under-extract. We currently ignore the schemaUrl that identifies which version a span was emitted or normalized to.

Proposed solution

Make extraction version-aware, probably via schema_url as a hint:

  1. Capture scopeSpans.schemaUrl at ingest
  2. Resolve gen_ai.* attributes through a small alias table (canonical/newest key + older aliases) so latest-name extraction still reads older traces
  3. Use it in GenAIExtractor to make extraction more robust, and expose the resolved semconv version for run metadata

We should degrade gracefully when schemaUrl is missing.

Alternatives considered

No response

Additional context

No response

Human confirmation

  • I am a human (not a bot, agent, or AI) filing this issue.

Metadata

Metadata

Assignees

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions