Skip to content

[.Net] Fix gen_ai.tool.arguments attribute name to gen_ai.tool.call.arguments#247

Merged
fpfp100 merged 2 commits into
mainfrom
fix/gen-ai-tool-call-arguments-attribute
May 8, 2026
Merged

[.Net] Fix gen_ai.tool.arguments attribute name to gen_ai.tool.call.arguments#247
fpfp100 merged 2 commits into
mainfrom
fix/gen-ai-tool-call-arguments-attribute

Conversation

@fpfp100

@fpfp100 fpfp100 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Renames gen_ai.tool.arguments to gen_ai.tool.call.arguments to align with OpenTelemetry GenAI semantic conventions
  • Fixes gen_ai.tool.call_result to gen_ai.tool.call.result in PayloadChunkingTests
  • Mirrors microsoft/opentelemetry-distro-dotnet#88

Test plan

  • Solution builds with zero warnings/errors
  • All 301 observability runtime tests pass
  • All 11 integration tests pass
  • Verify exported telemetry uses the correct gen_ai.tool.call.arguments attribute name

🤖 Generated with Claude Code

Align with the OpenTelemetry GenAI semantic conventions by renaming
the attribute from gen_ai.tool.arguments to gen_ai.tool.call.arguments.
Also fixes gen_ai.tool.call_result to gen_ai.tool.call.result in tests.

Mirrors microsoft/opentelemetry-distro-dotnet#88.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 7, 2026 21:30
@fpfp100
fpfp100 requested a review from a team as a code owner May 7, 2026 21:30
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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.

Pull request overview

Updates the observability runtime to emit OpenTelemetry GenAI tool-call attributes using the current semantic convention key (gen_ai.tool.call.arguments) and aligns tests accordingly, mirroring upstream distro behavior.

Changes:

  • Renamed emitted attribute key from gen_ai.tool.arguments to gen_ai.tool.call.arguments via OpenTelemetryConstants.
  • Fixed tool result attribute naming in tests (gen_ai.tool.call_resultgen_ai.tool.call.result).
  • Updated unit and integration tests to assert against the new attribute keys and related log messages.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Exporters/PayloadChunkingTests.cs Updates representative attribute keys used in payload size estimation tests.
src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Common/ExportFormatterTests.cs Adjusts truncation/size-logging assertions to the new tool-call arguments key.
src/Tests/Microsoft.Agents.A365.Observability.Runtime.IntegrationTests/Agent365ExporterE2ETests.cs Updates E2E exporter assertions to expect gen_ai.tool.call.arguments.
src/Tests/Microsoft.Agents.A365.Observability.Runtime.IntegrationTests/Agent365ExporterAsyncE2ETests.cs Updates async E2E exporter assertions to expect gen_ai.tool.call.arguments.
src/Observability/Runtime/Tracing/Scopes/OpenTelemetryConstants.cs Changes the constant value for tool-call arguments to the semantic convention key.

Comment thread src/Observability/Runtime/Tracing/Scopes/OpenTelemetryConstants.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 7, 2026 21:36
@fpfp100 fpfp100 changed the title Fix gen_ai.tool.arguments attribute name to gen_ai.tool.call.arguments [.Net] Fix gen_ai.tool.arguments attribute name to gen_ai.tool.call.arguments May 7, 2026

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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@fpfp100
fpfp100 enabled auto-merge (squash) May 8, 2026 18:04
@fpfp100
fpfp100 merged commit 4124189 into main May 8, 2026
11 checks passed
@fpfp100
fpfp100 deleted the fix/gen-ai-tool-call-arguments-attribute branch May 8, 2026 18:14
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.

5 participants