Skip to content

feat(semantic-conventions-genai): add GenAI semantic conventions package - #7014

Draft
wolfgangcodes wants to merge 1 commit into
open-telemetry:mainfrom
wolfgangcodes:feat/semconv-genai-package
Draft

feat(semantic-conventions-genai): add GenAI semantic conventions package#7014
wolfgangcodes wants to merge 1 commit into
open-telemetry:mainfrom
wolfgangcodes:feat/semconv-genai-package

Conversation

@wolfgangcodes

Copy link
Copy Markdown
Contributor

GenAI semantic conventions moved out of open-telemetry/semantic-conventions into their own repository so they can be versioned independently. Core semconv v1.44.0 keeps only 60 GenAI attributes, all deprecated, so the eventual v1.44.0 bump removes roughly 55 live ATTR_GEN_AI_* exports from '@opentelemetry/semantic-conventions/incubating'. This package is where those consumers land.

Adds:

  • 'scripts/semconv-genai/', a weaver codegen pipeline modelled on 'scripts/semconv/'. The GenAI registry uses the 'definition/2' file format, so it needs 'registry generate --v2', the 'semconv_*' JQ helpers need '"v2": true', attributes carry '.key' rather than '.name', and metrics carry '.name' rather than '.metric_name'. Weaver resolves the registry's dependency on core semconv by cloning it, so the container also needs a writable HOME and network access. Pinned to weaver v0.25.1, matching the GenAI spec repo's 'versions.env', and to a commit on the registry's 'main' branch since it has no tags or releases yet.
  • 'semantic-conventions-genai/', a new package exposing stable and incubating entry-points the same way '@opentelemetry/semantic-conventions' does. Its version tracks the GenAI registry's own schema version.

Every GenAI convention is currently in development, so the stable target emits files with no exports. The templates emit an 'export {};' guard in that case so the files remain valid ES modules; it disappears once GenAI conventions begin to stabilize.

The core semconv dependency is '^1.43.0' rather than the '^1.44.0' the registry manifest resolves against, because 1.44.0 is not published or in flight in this repository yet. It should rise alongside the core bump.

The independent release train is left to a follow-up, mirroring how #4690 landed weaver codegen and #4904 separately split semconv into its own release train.

Refs: #6783

Which problem is this PR solving?

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Short description of the changes

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

GenAI semantic conventions moved out of open-telemetry/semantic-conventions
into their own repository so they can be versioned independently. Core semconv
v1.44.0 keeps only 60 GenAI attributes, all deprecated, so the eventual v1.44.0
bump removes roughly 55 live ATTR_GEN_AI_* exports from
'@opentelemetry/semantic-conventions/incubating'. This package is where those
consumers land.

Adds:
- 'scripts/semconv-genai/', a weaver codegen pipeline modelled on
  'scripts/semconv/'. The GenAI registry uses the 'definition/2' file format,
  so it needs 'registry generate --v2', the 'semconv_*' JQ helpers need
  '"v2": true', attributes carry '.key' rather than '.name', and metrics carry
  '.name' rather than '.metric_name'. Weaver resolves the registry's dependency
  on core semconv by cloning it, so the container also needs a writable HOME
  and network access. Pinned to weaver v0.25.1, matching the GenAI spec repo's
  'versions.env', and to a commit on the registry's 'main' branch since it has
  no tags or releases yet.
- 'semantic-conventions-genai/', a new package exposing stable and incubating
  entry-points the same way '@opentelemetry/semantic-conventions' does. Its
  version tracks the GenAI registry's own schema version.

Every GenAI convention is currently in development, so the stable target emits
files with no exports. The templates emit an 'export {};' guard in that case so
the files remain valid ES modules; it disappears once GenAI conventions begin
to stabilize.

The core semconv dependency is '^1.43.0' rather than the '^1.44.0' the registry
manifest resolves against, because 1.44.0 is not published or in flight in this
repository yet. It should rise alongside the core bump.

The independent release train is left to a follow-up, mirroring how open-telemetry#4690 landed
weaver codegen and open-telemetry#4904 separately split semconv into its own release train.

Refs: open-telemetry#6783

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Wolfgang Therrien <wolfgang@wolfgangcodes.com>
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Missing ID

  • ✅ login: wolfgangcodes / name: Wolfgang Therrien (2875848)
  • ❌ The email address for the commit (2875848) is not linked to the GitHub account, preventing the EasyCLA check. Consult this Help Article and GitHub Help to resolve. (To view the commit's email address, add .patch at the end of this PR page's URL.) For further assistance with EasyCLA, please visit our EasyCLA portal and chat with our support bot.

One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via:

Co-authored-by: name <email>

Supported Co-authored-by: formats include:

  1. Anything <id+login@users.noreply.github.com> - it will locate your GitHub user by id part.
  2. Anything <login@users.noreply.github.com> - it will locate your GitHub user by login part.
  3. Anything <public-email> - it will locate your GitHub user by public-email part. Note that this email must be made public on Github.
  4. Anything <other-email> - it will locate your GitHub user by other-email part but only if that email was used before for any other CLA as a main commit author.
  5. login <any-valid-email> - it will locate your GitHub user by login part, note that login part must be at least 3 characters long.

Alternatively, if the co-author should not be included, remove the Co-authored-by: line from the commit message.

Please update your commit message(s) by doing git commit --amend and then git push [--force] and then request re-running CLA check via commenting on this pull request:

/easycla

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (b2ffd97) to head (2875848).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7014   +/-   ##
=======================================
  Coverage   95.02%   95.02%           
=======================================
  Files         409      409           
  Lines       14298    14304    +6     
  Branches     3277     3276    -1     
=======================================
+ Hits        13587    13593    +6     
  Misses        711      711           

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-08-20 17:37 UTC

Move out of draft to request review.

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.

1 participant