Skip to content
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

feat: Added instrumentation for chain.stream for langchain js. #2052

Merged
merged 2 commits into from Feb 29, 2024

Conversation

bizob2828
Copy link
Member

Description

This adds instrumentation for chain.stream. I also handled when ai_monitoring.streaming.enabled is set to false by creating the supportability metric and also the framework metric but no events.

How to Test

npm run versioned:internal langchain

Related Issues

Closes #1967

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.16%. Comparing base (b0a4ed1) to head (5672f97).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2052      +/-   ##
==========================================
+ Coverage   97.15%   97.16%   +0.01%     
==========================================
  Files         247      247              
  Lines       41567    41720     +153     
==========================================
+ Hits        40385    40538     +153     
  Misses       1182     1182              
Flag Coverage Δ
integration-tests-16.x 78.42% <28.27%> (-0.18%) ⬇️
integration-tests-18.x 78.40% <28.27%> (-0.18%) ⬇️
integration-tests-20.x 78.39% <28.27%> (-0.18%) ⬇️
unit-tests-16.x 90.61% <29.31%> (-0.22%) ⬇️
unit-tests-18.x 90.59% <29.31%> (-0.22%) ⬇️
unit-tests-20.x 90.59% <29.31%> (-0.22%) ⬇️
versioned-tests-16.x 74.60% <28.27%> (-0.18%) ⬇️
versioned-tests-18.x 75.44% <100.00%> (+0.07%) ⬆️
versioned-tests-20.x 75.45% <100.00%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

jsumners-nr
jsumners-nr previously approved these changes Feb 28, 2024
Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@bizob2828 bizob2828 merged commit 03abfce into newrelic:main Feb 29, 2024
22 checks passed
Node.js Engineering Board automation moved this from Needs PR Review to Done: Issues recently completed Feb 29, 2024
@github-actions github-actions bot mentioned this pull request Mar 4, 2024
@bizob2828 bizob2828 deleted the langchain-streamed branch April 3, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Node.js Engineering Board
  
Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

(langchain) Instrument streamed responses
2 participants