Skip to content

feat(openai-agents): Set the gen_ai.tool.definitions attribute - #6956

Merged
alexander-alderman-webb merged 52 commits into
masterfrom
webb/openai-agents-tool-definitions-2
Jul 31, 2026
Merged

feat(openai-agents): Set the gen_ai.tool.definitions attribute#6956
alexander-alderman-webb merged 52 commits into
masterfrom
webb/openai-agents-tool-definitions-2

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Set the attribute according to the schema defined in

https://github.com/getsentry/rfcs/blob/main/text/0153-decoupling-sentrys-generative-ai-conventions-from-open-telemetry.md

Unlike openai, the package uses dataclasses for tool types. Handle each one individually.

Issues

Closes #5767
Closes #6900

Reminders

@alexander-alderman-webb alexander-alderman-webb changed the title feat(openai-agents): Set gen_ai.tool.definitions attribute feat(openai-agents): Set gen_ai.tool.definitions attribute Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

100310 passed | ⏭️ 7021 skipped | Total: 107331 | Pass Rate: 93.46% | Execution Time: 360m 34s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +60
Passed Tests 📈 +60
Failed Tests
Skipped Tests

All tests are passing successfully.

✅ Patch coverage is 94.20%. Project has 2511 uncovered lines.
❌ Project coverage is 89.89%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/openai_agents/spans/ai_client.py 94.20% ⚠️ 4 Missing and 2 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.92%    89.89%    -0.03%
==========================================
  Files          193       193         —
  Lines        24766     24832       +66
  Branches      8884      8912       +28
==========================================
+ Hits         22268     22321       +53
- Misses        2498      2511       +13
- Partials      1416      1415        -1

Generated by Codecov Action

Comment thread sentry_sdk/integrations/openai_agents/spans/ai_client.py Outdated
Comment thread sentry_sdk/integrations/openai_agents/spans/ai_client.py
@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review July 31, 2026 08:56
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner July 31, 2026 08:56
Comment thread sentry_sdk/integrations/openai_agents/spans/ai_client.py
Comment thread sentry_sdk/integrations/openai_agents/spans/ai_client.py
Comment thread tests/integrations/openai_agents/test_openai_agents.py
@alexander-alderman-webb alexander-alderman-webb changed the title feat(openai-agents): Set gen_ai.tool.definitions attribute feat(openai-agents): Set the gen_ai.tool.definitions attribute Jul 31, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 114f34c. Configure here.

Comment thread sentry_sdk/integrations/openai_agents/spans/ai_client.py
Base automatically changed from webb/openai-agents-tool-overwrite to master July 31, 2026 12:49
@alexander-alderman-webb
alexander-alderman-webb merged commit 4eb0527 into master Jul 31, 2026
145 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/openai-agents-tool-definitions-2 branch July 31, 2026 13:07
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.

Fix openai-agents tox failures openai-agents: Send gen_ai.tool.definitions with appropriate format

2 participants