Skip to content

Langchain Instrumentation#41

Merged
nirga merged 5 commits intotraceloop:mainfrom
Kartik1397:instrument-langchain
Feb 4, 2024
Merged

Langchain Instrumentation#41
nirga merged 5 commits intotraceloop:mainfrom
Kartik1397:instrument-langchain

Conversation

@Kartik1397
Copy link
Copy Markdown
Contributor

@Kartik1397 Kartik1397 commented Jan 26, 2024

Testing

Screenshot 2024-01-30 at 2 03 05 AM

/claim #7

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 26, 2024

CLA assistant check
All committers have signed the CLA.

@Kartik1397 Kartik1397 force-pushed the instrument-langchain branch 4 times, most recently from bb12589 to 6128124 Compare January 29, 2024 20:43
@Kartik1397 Kartik1397 marked this pull request as ready for review January 29, 2024 20:45
assert.ok(spanNames.includes("langchain.agent"));
}).timeout(60000);

it("should set attributes in span for chain instrumentation", async () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add a test that uses Langchain LCEL?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Followed this doc to add LCEL test. Let me know if I should cover anything else as well.


it("should set attributes in span for tools and agent instrumentation", async () => {
const llm = new ChatOpenAI({});
const tools = [new Calculator(), new langchainToolsModule.SerpAPI()];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we remove the dependency on the SerpAPI?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added test which use WikipediaQueryRun instead of SerpAPI.

@Kartik1397 Kartik1397 force-pushed the instrument-langchain branch from 6128124 to 758f458 Compare January 30, 2024 06:07
@Kartik1397 Kartik1397 force-pushed the instrument-langchain branch from 758f458 to 8caafc1 Compare February 2, 2024 20:31
@Kartik1397 Kartik1397 force-pushed the instrument-langchain branch from 8caafc1 to 51e4be8 Compare February 2, 2024 20:31
@nirga nirga force-pushed the instrument-langchain branch from 411aff5 to a84c60a Compare February 4, 2024 15:28
@nirga nirga merged commit a4ae35e into traceloop:main Feb 4, 2024
@Kartik1397 Kartik1397 deleted the instrument-langchain branch February 4, 2024 15:44
5war00p pushed a commit to 5war00p/openllmetry-js that referenced this pull request Feb 4, 2024
Co-authored-by: Nir Gazit <nir.gzt@gmail.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>
5war00p pushed a commit to 5war00p/openllmetry-js that referenced this pull request Feb 4, 2024
Co-authored-by: Nir Gazit <nir.gzt@gmail.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>
5war00p pushed a commit to 5war00p/openllmetry-js that referenced this pull request Feb 4, 2024
Co-authored-by: Nir Gazit <nir.gzt@gmail.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants