Update OpenTelemetry GenAI conventions to latest - #15
Closed
github-actions[bot] wants to merge 2 commits into
Closed
Update OpenTelemetry GenAI conventions to latest#15github-actions[bot] wants to merge 2 commits into
github-actions[bot] wants to merge 2 commits into
Conversation
Add document modality detection in OtelMessageSerializer.DeriveModalityFromMediaType to support the new 'document' modality value added to the GenAI semantic conventions (open-telemetry/semantic-conventions-genai#142). PDF, Office, and ODF file types (application/pdf, application/msword, application/vnd.openxmlformats-officedocument.*, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/vnd.oasis.opendocument.*, application/rtf, text/rtf) now emit modality: 'document' in message-part serialization. Also migrate doc-comment wording in all OpenTelemetry* instrumentation client files from 'Semantic Conventions for Generative AI systems v1.41' to 'GenAI Semantic Conventions latest' per the new standalone conventions repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…#258) Maps ChatOptions.Reasoning?.Effort to gen_ai.request.reasoning.level string tag on GenAI inference spans. ReasoningEffort.Low/Medium/High/ExtraHigh emit 'low'/'medium'/'high'/'extra_high' respectively; None is not emitted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Author
|
Commit pushed:
|
Author
|
Incremental update: integrated upstream semantic-conventions-genai#258 — scanned commit New convention implemented:
Validation: 15
|
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.
What this PR implements
gen-aidocumentmodality in multimodal content partsIsDocumentMediaTypeinOtelMessageSerializer;DeriveModalityFromMediaTypereturns"document"for PDF/Office/ODF MIME types. AugmentedAllOfficialOtelContentPartTypes_SerializedCorrectlytest.gen-aigen_ai.request.reasoning.levelattributeReasoningLevelconstant inOpenTelemetryConstsand emission inOpenTelemetryChatClient; mapsChatOptions.Reasoning?.Effortto"low"/"medium"/"high"/"extra_high". AugmentedExpectedInformationLogged_Async.gen-aiSemantic Conventions for Generative AI systems v1.41toGenAI Semantic Conventions latest.Validation: build clean (net8.0/net9.0/net10.0, 0 warnings); 15
OpenTelemetryChatClientTestspass (all 3 TFMs). No public API surface change (OpenTelemetryConstsisinternal); doc-comment atGenAI Semantic Conventions latest.Upstream scan tracking
Legend: 🔴 implemented here · ✅ already aligned · 🟡 watch/deferred · 🟢 not applicable (no client / docs-only)
Merged upstream changes (Unreleased) -- applicability to dotnet/extensions
Scanned at commit
93de98a(2026-06-18).gen-aiplanoperation name for agent planning spansgen-aimoonshot_aiwell-known value forgen_ai.provider.namegen-aigen_ai.agent.namemarked sampling-relevantgen-aigen_ai.workflow.durationmetric +gen_ai.workflow.namemcpgen_ai.tool.call.arguments/resulton MCP server spangen-aigen-aidocumentmodality in multimodal content partsOtelMessageSerializer.DeriveModalityFromMediaType.gen-aigen_ai.conversation.compacted+CompactionPartschemagen-aigen-aigen_ai.provider.namedescriptiongen-aigen_ai.provider.namerelaxed to Conditionally Requiredgen-aigen-aigen_ai.request.top_ktypedouble→int, decoding-onlyif (options.TopK is int topK).gen-aitop_kis sampling/decoding, nottop_logprobsgen-aigen_ai.conversation.idmust not use fallback valuesmcpgen-aigen_ai.agent.idscope clarified; removed from internal spansgen-aigen_ai.system_instructionsparts to text onlygen-aigen_ai.request.reasoning.leveladded to inference spansOpenTelemetryChatClient; mapsChatOptions.Reasoning?.Effort.gen-aigen_ai.provider.namefrominvoke_agentinternal spaninvoke_agentinstrumentation today.In-flight upstream changes (open PRs) -- applicability if merged
Excluded dependency / CI / chore / server-only PRs: dotnet#112, dotnet#164, dotnet#202, dotnet#215, dotnet#252, dotnet#283, dotnet#290, dotnet#291, dotnet#324, dotnet#325, dotnet#328, dotnet#340, dotnet#351.
gen-aigen_ai.token.cache/gen_ai.token.reasoningmetric attributesgen_ai.client.token.usage.gen-aiexecute_toolspanFunctionInvocationProcessorspan naming.gen-aibyte_sizeon multimodal content partsOtelBlobPart/OtelUriPart/OtelFilePart.gen-aiBlobPart.contentoptional +stripped_reasonOtelBlobPart.Contentto be made optional.gen-aigen-aigen_ai.agent.finish_reasonattributeinvoke_agentinstrumentation today.gen-aigen_ai.agent.invocation.idattributeinvoke_agentinstrumentation today.gen-aigen-aigen_ai.invoke_agent.inference_calls/tool_callsmetricsinvoke_agentinstrumentation today.gen-aigen_ai.workflow.duration→gen_ai.invoke_workflow.durationgen-aigen_ai.agent.identity.id/gen_ai.agent.identity.nameTracking state