Skip to content

Conversation

@umaannamalai
Copy link
Contributor

Add instrumentation for Strands agents, swarms, graphs, and tools.

TimPansino and others added 12 commits October 23, 2025 14:32
* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking
* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking
* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Add tests file.

* Cleanup instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* [MegaLinter] Apply linters fixes

* Strands Mock Model (#1551)

* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking

* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Add tests file.

* Cleanup instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* Handle additional args in mock model.

* Add test to force exception and exercise _handle_tool_streaming_completion_error.

* Strands Mock Model (#1551)

* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking

* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Add tests file.

* Cleanup instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* Handle additional args in mock model.

* Strands Mock Model (#1551)

* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking

* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* [MegaLinter] Apply linters fixes

* Add test to force exception and exercise _handle_tool_streaming_completion_error.

* Implement strands context passing instrumentation.

* Address review feedback.

* [MegaLinter] Apply linters fixes

* Remove test_simple.py file.

---------

Co-authored-by: Tim Pansino <tpansino@newrelic.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
* Skip hypercorn tests for v0.18 (#1579)

* Skip hypercorn tests for v0.18

* Remove tornadomaster for 3.14

* Fix instability in CI caused by health check tests (#1584)

* Bump the github_actions group across 1 directory with 5 updates (#1582)

Bumps the github_actions group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `5.0.0` | `5.0.1` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `5.8.0` | `5.9.0` |
| [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) | `3.6.0` | `3.7.0` |
| [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `7.1.2` | `7.1.3` |
| [github/codeql-action](https://github.com/github/codeql-action) | `4.31.2` | `4.31.3` |



Updates `actions/checkout` from 5.0.0 to 5.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@08c6903...93cb6ef)

Updates `docker/metadata-action` from 5.8.0 to 5.9.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@c1e5197...318604b)

Updates `docker/setup-qemu-action` from 3.6.0 to 3.7.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](docker/setup-qemu-action@2910929...c7c5346)

Updates `astral-sh/setup-uv` from 7.1.2 to 7.1.3
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@8585678...5a7eac6)

Updates `github/codeql-action` from 4.31.2 to 4.31.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@0499de3...014f16e)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github_actions
- dependency-name: docker/metadata-action
  dependency-version: 5.9.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github_actions
- dependency-name: docker/setup-qemu-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github_actions
- dependency-name: astral-sh/setup-uv
  dependency-version: 7.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github_actions
- dependency-name: github/codeql-action
  dependency-version: 4.31.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github_actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Rename strands instrument functions

* Add instrumentation for strands multiagent

* Reorganize strands tests

* Strands multiagent tests

* Remove timestamp from test expected events.

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking
* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Add tests file.

* Cleanup instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* [MegaLinter] Apply linters fixes

* Strands Mock Model (#1551)

* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking

* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Add tests file.

* Cleanup instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* Handle additional args in mock model.

* Add test to force exception and exercise _handle_tool_streaming_completion_error.

* Strands Mock Model (#1551)

* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking

* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Add tests file.

* Cleanup instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* Handle additional args in mock model.

* Strands Mock Model (#1551)

* Add strands to tox.ini

* Add mock models for strands testing

* Add simple test file to validate strands mocking

* Add baseline instrumentation.

* Add tool and agent instrumentation.

* Cleanup.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>

* [MegaLinter] Apply linters fixes

* Add test to force exception and exercise _handle_tool_streaming_completion_error.

* Implement strands context passing instrumentation.

* Address review feedback.

* [MegaLinter] Apply linters fixes

* Remove test_simple.py file.

---------

Co-authored-by: Tim Pansino <tpansino@newrelic.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
* Rename strands instrument functions

* Add instrumentation for strands multiagent

* Reorganize strands tests

* Strands multiagent tests

* Remove timestamp from test expected events.

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.89s
✅ MARKDOWN markdownlint 7 0 0 0 1.3s
✅ PYTHON ruff 960 0 0 0 1.02s
✅ PYTHON ruff-format 960 0 0 0 0.34s
✅ YAML prettier 15 0 0 0 1.53s
✅ YAML v8r 15 0 0 5.47s
✅ YAML yamllint 15 0 0 0.69s

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 Dec 5, 2025
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 71.05263% with 99 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.66%. Comparing base (6860fc1) to head (6cedff1).

Files with missing lines Patch % Lines
newrelic/hooks/mlmodel_strands.py 68.57% 67 Missing and 32 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1600      +/-   ##
==========================================
- Coverage   81.81%   81.66%   -0.15%     
==========================================
  Files         207      209       +2     
  Lines       24055    24390     +335     
  Branches     3821     3869      +48     
==========================================
+ Hits        19681    19919     +238     
- Misses       3095     3162      +67     
- Partials     1279     1309      +30     

☔ 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.

@lrafeei lrafeei marked this pull request as ready for review December 8, 2025 19:20
@lrafeei lrafeei requested a review from a team as a code owner December 8, 2025 19:20
@umaannamalai umaannamalai added this to the v11.2.0 milestone Dec 8, 2025
@Newrelic-Boomi
Copy link

@mergify mergify bot removed the tests-failing Tests failing in CI. label Dec 8, 2025
@umaannamalai umaannamalai merged commit c31c334 into main Dec 8, 2025
108 of 111 checks passed
@umaannamalai umaannamalai deleted the develop-strands branch December 8, 2025 22:32
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.

6 participants