Skip to content

Conversation

@TimPansino
Copy link
Contributor

Overview

  • Add additional instrumentation to Strands Agents to capture errors in synchronous tool functions decorated with @tool.
  • Change coverage of all tools in Strands to track errors emitted from stream() instead of relying on the _tool_func attribute for better coverage.
  • Overhaul Strands Agents testing to better cover the entire matrix of tool types and invocation functions.

@TimPansino TimPansino requested a review from a team as a code owner January 9, 2026 20:08
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.95s
✅ MARKDOWN markdownlint 7 0 0 0 1.3s
✅ PYTHON ruff 962 0 0 0 1.01s
✅ PYTHON ruff-format 962 0 0 0 0.36s
✅ YAML prettier 15 0 0 0 1.48s
✅ YAML v8r 15 0 0 5.48s
✅ YAML yamllint 15 0 0 0.65s

See detailed reports in MegaLinter artifacts

MegaLinter is graciously provided by OX Security

@mergify mergify bot added the tests-failing Tests failing in CI. label Jan 9, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.66%. Comparing base (a7ade08) to head (89ef0b3).

Files with missing lines Patch % Lines
newrelic/hooks/mlmodel_strands.py 73.07% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1623   +/-   ##
=======================================
  Coverage   81.65%   81.66%           
=======================================
  Files         209      209           
  Lines       24392    24416   +24     
  Branches     3870     3873    +3     
=======================================
+ Hits        19918    19939   +21     
- Misses       3162     3164    +2     
- Partials     1312     1313    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify bot removed the tests-failing Tests failing in CI. label Jan 9, 2026
@mergify mergify bot added the tests-failing Tests failing in CI. label Jan 13, 2026
transaction = current_transaction()
if transaction:
# notice_error will handle pulling from sys.exc_info() if there's an active exception.
transaction.notice_error()
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have a handle to the tool_id here (stored in the strands_attrs? We typically pass the tool_id/ agent_id in as an attribute to the notice_error call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was able to add tool_id, no handle to agent_id though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-failing Tests failing in CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants