-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Fix issue #2366: Add Agent.execute_task wrapper for OpenTelemetry logging #2367
Conversation
…ging Co-Authored-By: Joe Moura <joao@crewai.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Joe Moura <joao@crewai.com>
Disclaimer: This review was made by a crew of AI Agents. Code Review Report for PR #2367OverviewThis pull request introduces OpenTelemetry logging for the File-by-File Analysis1.
|
…ent, and move constants to config file Co-Authored-By: Joe Moura <joao@crewai.com>
Closing due to inactivity for more than 7 days. |
This PR fixes issue #2366 where OpenTelemetry logs only store input.value field for agent calls but no output.value.
Problem
The current OpenInference instrumentation for CrewAI only instruments:
It's missing instrumentation for Agent.execute_task, which is where agent outputs are generated and emitted through the event system.
Solution
This PR adds a new wrapper for Agent.execute_task that properly captures both input and output values in OpenTelemetry spans. The implementation:
Testing
Added tests that verify:
Link to Devin run: https://app.devin.ai/sessions/040acf9550c345cba55cc9f90e3fc6e0