alibaba / alibaba/loongsuite-python

feat: Add support for embeddings operations in langchain instrumentation

Open
#142 1 comment 0 reactions 0 assignees View on GitHub
contribution welcome enhancement genai instrumentaion
Dominant language
Python
Stars
133
Forks
35
Avg merge
1d 12h
Merged PRs (30d)
5

Description

### What problem do you want to solve?

Currently, embeddings operations are not automatically instrumented by `loongsuite-instrumentation-langchain`.

### Describe the solution you'd like

- Add an instrumentation point for LangChain Embedding.
- Capture embeddings operations with [genai-util](https://github.com/alibaba/loongsuite-python-agent/tree/main/util/opentelemetry-util-genai).
- Add unit tests for instrumentations.

### Describe alternatives you've considered

_No response_

### Additional Context

_No response_

### Would you like to implement a fix?

None

### Tip

[React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).

Contributor guide

Open the contributing guide

Research direction

Start by locating the loongsuite-instrumentation-langchain package and its existing instrumentation unit tests, then read the opentelemetry-util-genai utility linked in the issue. Add coverage for LangChain Embedding operations and verify that embedding calls are captured through genai-util with the unit tests passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.