-
Notifications
You must be signed in to change notification settings - Fork 968
fix(openai-agents): fix broken traces with agents handoff on run_stream #3143
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b7dd9cf
fix(openai-agents): fix broken traces with agents handoff
galkleinman 6748531
add streaming support
galkleinman 14ffe2f
missing files
galkleinman b469f03
fix: duplicate tool call spans
galkleinman 28be464
remove unwanted change
galkleinman cab6f34
make python 3.9 test pass
galkleinman dc1247b
fix linting
galkleinman 6ea260a
remove redundant comments
galkleinman 7d221ab
code rabbit comments
galkleinman 76dcbcb
lint
galkleinman bafbc91
fixing more comments
galkleinman eb1377b
fix all issues
galkleinman fe4fa8f
fix jsonencoder issue
galkleinman 1f7f90f
Update packages/opentelemetry-instrumentation-openai-agents/opentelem…
galkleinman 6ad26cd
replace tools set with memory leak safe one
galkleinman ca0b49e
merging
galkleinman e93d8ea
encoder cleanup
galkleinman 634af4b
fix tests
galkleinman 993b90e
lint
galkleinman 1673c03
use semconv to inputs and outputs
galkleinman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
383 changes: 287 additions & 96 deletions
383
...try-instrumentation-openai-agents/opentelemetry/instrumentation/openai_agents/__init__.py
Large diffs are not rendered by default.
Oops, something went wrong.
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
1,271 changes: 1,271 additions & 0 deletions
1,271
...cassettes/test_openai_agents/test_recipe_workflow_agent_handoffs_with_function_tools.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.
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.
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.
Fix the dict handling logic and consider simplifying nested conditions.
The JSONEncoder implementation has a logical flaw in the dict handling section. Currently, it only returns the filtered dict if "callbacks" is present, but it should process all dicts consistently.
Apply this diff to fix the dict handling logic:
Additionally, consider the static analysis suggestion to combine the nested if statements in the
set_span_attributefunction (lines 8-10), though this is a minor improvement:🧰 Tools
🪛 Ruff (0.12.2)
26-27: Use a single
ifstatement instead of nestedifstatementsCombine
ifstatements usingand(SIM102)
🤖 Prompt for AI Agents