Skip to content

Conversation

TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Aug 12, 2025

Motivation and Context

The OTel workgroup has been thinking about enhancing tracing for agents. This is a proposal from our tracing team: open-telemetry/semantic-conventions#2528. This PR implements part of the proposal so that when the proposal gets merged, we can quickly follow.

This is a follow-up PR after the Python PR #12834

Description

Two new attributes are added to the invoke_agent span, namely the gen_ai.agent.invocation_input and gen_ai.agent.invocation_output.

image

Contribution Checklist

@TaoChenOSU TaoChenOSU self-assigned this Aug 12, 2025
@TaoChenOSU TaoChenOSU added the .NET Issue or Pull requests regarding .NET code label Aug 12, 2025
@TaoChenOSU TaoChenOSU marked this pull request as ready for review August 12, 2025 23:49
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner August 12, 2025 23:49
@github-actions github-actions bot changed the title Input & output attributes in invoke_agent span .Net: Input & output attributes in invoke_agent span Aug 12, 2025
@TaoChenOSU TaoChenOSU enabled auto-merge August 15, 2025 17:52
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Aug 15, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 15, 2025
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
The OTel workgroup has been thinking about enhancing tracing for agents.
This is a proposal from our tracing team:
open-telemetry/semantic-conventions#2528. This
PR implements part of the proposal so that when the proposal gets
merged, we can quickly follow.

This is a follow-up PR after the Python PR #12834 
### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

Two new attributes are added to the invoke_agent span, namely the
`gen_ai.agent.invocation_input` and `gen_ai.agent.invocation_output`.

<img width="870" height="384" alt="image"
src="https://github.com/user-attachments/assets/c2cf069a-af00-4ae2-8fed-745c166d9cbc"
/>

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Chris <[email protected]>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 15, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Aug 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 15, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Aug 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 25, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Aug 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 27, 2025
@dmytrostruk dmytrostruk merged commit 9568fe8 into main Aug 27, 2025
19 checks passed
@dmytrostruk dmytrostruk deleted the taochen/dotnet-agent-span-new-attributes branch August 27, 2025 05:11
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents .NET Issue or Pull requests regarding .NET code telemetry
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants