Skip to content

refactor: LangChain LLM event refactor#3745

Merged
amychisholm03 merged 4 commits intonewrelic:mainfrom
amychisholm03:langchain-llm-event-refactor
Feb 12, 2026
Merged

refactor: LangChain LLM event refactor#3745
amychisholm03 merged 4 commits intonewrelic:mainfrom
amychisholm03:langchain-llm-event-refactor

Conversation

@amychisholm03
Copy link
Contributor

@amychisholm03 amychisholm03 commented Feb 11, 2026

Description

Refactors LangChain LLM events. Introduces the base LlmTool class. I forgot to include LlmTool.agent_name in the initial LlmTool class, so that's included now too.

There are some fields that are not present in the AIM spec (appName, metadata tags) but were mentioned in the initial CDD for LangChain instrumentation, so I kept them.

How to Test

npm run unit
npm run versioned langchain
npm run versioned langchain-openai
npm run versioned langchain-aws

Related Issues

Part of #3687

@amychisholm03 amychisholm03 force-pushed the langchain-llm-event-refactor branch from 132a608 to 4283943 Compare February 11, 2026 21:41
@amychisholm03 amychisholm03 marked this pull request as ready for review February 11, 2026 21:43
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.51%. Comparing base (0ccad21) to head (0f64641).
⚠️ Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (0ccad21) and HEAD (0f64641). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (0ccad21) HEAD (0f64641)
integration-tests-cjs-20.x 1 0
integration-tests-cjs-24.x 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3745      +/-   ##
==========================================
- Coverage   90.11%   81.51%   -8.60%     
==========================================
  Files         449      440       -9     
  Lines       58495    57166    -1329     
  Branches        1        1              
==========================================
- Hits        52710    46598    -6112     
- Misses       5785    10568    +4783     
Flag Coverage Δ
integration-tests-cjs-20.x ?
integration-tests-cjs-24.x ?
integration-tests-esm-20.x 52.98% <55.18%> (+0.02%) ⬆️
integration-tests-esm-24.x 54.20% <65.14%> (+0.03%) ⬆️
versioned-tests-20.x 81.39% <100.00%> (-0.29%) ⬇️
versioned-tests-22.x 81.40% <100.00%> (-0.29%) ⬇️
versioned-tests-24.x 81.31% <100.00%> (-0.28%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jsumners-nr jsumners-nr self-requested a review February 12, 2026 14:19
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.

Please consider incorporating amychisholm03#14

@amychisholm03 amychisholm03 merged commit b2612ec into newrelic:main Feb 12, 2026
24 of 25 checks passed
@github-project-automation github-project-automation bot moved this from Needs PR Review to Done: Issues recently completed in Node.js Engineering Board Feb 12, 2026
@amychisholm03 amychisholm03 deleted the langchain-llm-event-refactor branch February 12, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done: Issues recently completed

Development

Successfully merging this pull request may close these issues.

2 participants

Comments