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(langchain): correctly identify inputs for batch lcel chain calls #9195
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 128 Passed, 319 Skipped, 5m 28.66s Total duration (1m 40.63s time saved) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9195 +/- ##
===========================================
- Coverage 78.53% 26.57% -51.97%
===========================================
Files 1277 1262 -15
Lines 120384 119955 -429
===========================================
- Hits 94543 31876 -62667
- Misses 25841 88079 +62238 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-05-14 19:17:55 Comparing candidate commit 1167ddb in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 209 metrics, 9 unstable metrics. |
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.
Thank you!
…9195) ## Changes Made Both `batch` and `invoke` calls on LCEL chains for LangChain pass through the same traced method, for code re-use. However, the `kwarg` for inputs to batch calls is `inputs`, while for invoke calls is `input`. This change reflects that, and unit tests have been updated ## Motivation Fix possible breaking customer apps (no reports yet as far as I can tell). ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. ## Reviewer Checklist - [ ] Title is accurate - [ ] All changes are related to the pull request's stated goal - [ ] Description motivates each change - [ ] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [ ] Testing strategy adequately addresses listed risks - [ ] Change is maintainable (easy to change, telemetry, documentation) - [ ] Release note makes sense to a user of the library - [ ] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [ ] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) (cherry picked from commit 5148d18)
This comment was marked as resolved.
This comment was marked as resolved.
…[backport 2.9] (#9267) Backport 5148d18 from #9195 to 2.9. ## Changes Made Both `batch` and `invoke` calls on LCEL chains for LangChain pass through the same traced method, for code re-use. However, the `kwarg` for inputs to batch calls is `inputs`, while for invoke calls is `input`. This change reflects that, and unit tests have been updated ## Motivation Fix possible breaking customer apps (no reports yet as far as I can tell). ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) Co-authored-by: Sam Brenner <106700075+sabrenner@users.noreply.github.com>
Changes Made
Both
batch
andinvoke
calls on LCEL chains for LangChain pass through the same traced method, for code re-use. However, thekwarg
for inputs to batch calls isinputs
, while for invoke calls isinput
. This change reflects that, and unit tests have been updatedMotivation
Fix possible breaking customer apps (no reports yet as far as I can tell).
Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.Reviewer Checklist