Update open-telemetry/semantic-conventions-genai to latest - #13
Closed
github-actions[bot] wants to merge 4 commits into
Closed
Update open-telemetry/semantic-conventions-genai to latest#13github-actions[bot] wants to merge 4 commits into
github-actions[bot] wants to merge 4 commits into
Conversation
Add .github/workflows/meai-update-otel-genai.md (and its compiled lock)
that runs daily, plus on manual dispatch, to integrate
open-telemetry/semantic-conventions GenAI updates into
Microsoft.Extensions.AI and maintain a single draft PR until the upstream
release is published.
- Invokes the update-otel-genai-conventions skill in Plan-then-Implement
mode, comparing upstream HEAD against this repo''s main.
- Relies on the skill''s change-classification reference to classify each
upstream change as actionable-now (code/minor action on an
already-emitted item) vs deferred (constant not yet emitted, no client,
server-side, doc-only), and adds a lifecycle invariant so deferral never
collapses a run into a no-op -- deferred items still keep a maintained
draft PR open.
- Finds the workflow''s PR by content (automation + area-ai labels plus the
otel-genai-tracking state block), never by branch name, then chooses an
action from PR state plus an upstream-SHA comparison: caught-up
open/merged is a no-op; behind-open-draft does an incremental push to the
PR''s existing head branch; behind-non-draft leaves an advisory comment;
merged-but-behind and any closed-without-merge PR (caught up or behind)
start a fresh PR; a still-open prior published-version PR gets only an
advisory comment.
- Defers the PR title, target token, and full PR body (status note,
what-this-implements table, upstream-scan applicability tables, and the
otel-genai-tracking state block) to the skill''s pr-description
reference: the target is `latest` while the conventions are unreleased
and a concrete v{version} once a release/schema publishes. Fresh PRs use
a unique, run-scoped branch update-otel-genai-to-{target}-{GITHUB_RUN_ID}
so they never collide with a branch a closed PR left behind; labeled
automation and area-ai; retitles the PR when the skill''s target resolves
to a version; marks it ready for review once the upstream release is
published.
- Restricts edits to src/test/docs/samples for Microsoft.Extensions.AI via
allowed-files; commits on the checked-out HEAD without creating the PR
branch locally so patch generation diffs against the exact checkout SHA.
- No-op runs write the reason to the step summary and emit no issue,
comment, or report; failures are not reported as issues; threat
detection is disabled (the sandbox, read-only permissions, and file
allow-list already constrain the run); at most one comment is posted
per run.
- Guards execution with an if condition so it only runs on dispatch or on
the canonical (non-fork) repository, and uses the Copilot PAT pool.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate unreleased gen-ai semantic conventions changes from upstream HEAD (e153ed94728993acd0ee6a958559032ca8b20afe). - Add gen_ai.request.reasoning.level attribute for capturing requested reasoning effort level from ChatOptions.Reasoning.Effort, mapping ReasoningEffort enum to normalized lowercase tokens (none, low, medium, high, extra_high) - Add 'document' modality value for application/* media types (e.g., PDF, DOCX) in DeriveModalityFromMediaType - Update tests to cover new reasoning.level attribute with ReasoningEffort.High and document modality with application/pdf The moonshot_ai provider value is a spec documentation addition only (no code change required). Other upstream changes (gen_ai.conversation.compacted, gen_ai.prompt.version/variable, gen_ai.invoke_agent.duration, gen_ai.execute_tool.duration, memory/workflow/agent spans) are deferred as they have no current emission site in M.E.AI or require capabilities not yet instrumented. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrate unreleased gen-ai semantic conventions changes from upstream HEAD (e153ed9) in open-telemetry/semantic-conventions-genai.
This PR maintains continuous alignment with the OpenTelemetry GenAI semantic conventions (Development stability) by implementing actionable changes and documenting deferred items until they have emission sites in Microsoft.Extensions.AI.
Supersedes #11 (closed without merge).
What this PR implements
gen_ai.request.reasoning.levelattribute addedOpenTelemetryConsts.csand emission inOpenTelemetryChatClient.cs. MapsChatOptions.Reasoning.Effortenum to lowercase string values ("none", "low", "medium", "high", "extra_high").documentmodality value added to message schemasDeriveModalityFromMediaType()to return"document"forapplication/*media types (e.g., PDF, DOCX).moonshot_aiprovider value addedgen_ai.provider.namealready accepts any string value. This is a well-known value addition to the spec.Deferred Changes (Documented Only)
gen_ai.conversation.compactedattributegen_ai.prompt.versionandgen_ai.prompt.variableattributesgen_ai.workflow.durationmetricgen_ai.invoke_agent.durationandgen_ai.execute_tool.durationmetricsplanoperation name for agent planning spansparams._metakeys per SEP-414. No code impact.gen_ai.conversation.idguidance (no fallback UUIDs)gen_ai.provider.namegeneralizationgen_ai.provider.namerelaxed to Conditionally Required on duration metricgen_ai.system_instructionspart types limited to textgen_ai.request.top_ktype change and scopingdoubletointand scoped to decoding only (retrieval uses newgen_ai.retrieval.top_k). M.E.AI already usesintand only emits for chat (decoding context).Testing
gen_ai.request.reasoning.levelemission withReasoningEffort.Highdocumentmodality withapplication/pdfcontentUpstream Tracking