-
Notifications
You must be signed in to change notification settings - Fork 7.2k
OTel GenAI Traces for Agent and Tool #6653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6653 +/- ##
==========================================
- Coverage 79.78% 79.65% -0.13%
==========================================
Files 228 229 +1
Lines 17054 17126 +72
==========================================
+ Hits 13606 13642 +36
- Misses 3448 3484 +36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@EItanya please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes make sense to me overall, I am going to do dig deeper into the other instrumentation libraries now to make sure it makes sense in that context as well
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_base_chat_agent.py
Show resolved
Hide resolved
python/packages/autogen-core/src/autogen_core/_telemetry/_genai.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My one major comment is about error.type
attribute. That seems to be the only stable
attribute in these spans. I'm not a Python expert, but can we capture the exception, add it, and then bubble it up?
Yes, this is done. I added try-catch block to set the attribute if an error occurs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look great, I am going to test them out in kagent
today :)
Add OTel GenAI traces:
create_agent
invoke_agnet
execute_tool
Introduces context manager helpers to create these traces. The helpers also serve as instrumentation points for other instrumentation libraries.
Resolves #6644