Skip to content

Commit e34758f

Browse files
committed
changelog
1 parent 5b85f9a commit e34758f

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@
5858

5959
Adds instrumentation for the Google GenAI [`embedContent`](https://ai.google.dev/gemini-api/docs/embeddings) API, creating `gen_ai.embeddings` spans.
6060

61+
- feat(langchain): Support embeddings APIs in LangChain ([#20017](https://github.com/getsentry/sentry-javascript/pull/20017))
62+
63+
Adds instrumentation for LangChain embeddings (`embedQuery`, `embedDocuments`), creating `gen_ai.embeddings` spans. In Node.js, embedding classes from `@langchain/openai`, `@langchain/google-genai`, `@langchain/mistralai`, and `@langchain/google-vertexai` are auto-instrumented. For other runtimes, use the new `instrumentLangChainEmbeddings` API:
64+
65+
```javascript
66+
import * as Sentry from '@sentry/cloudflare';
67+
import { OpenAIEmbeddings } from '@langchain/openai';
68+
69+
const embeddings = Sentry.instrumentLangChainEmbeddings(
70+
new OpenAIEmbeddings({ model: 'text-embedding-3-small' }),
71+
);
72+
73+
await embeddings.embedQuery('Hello world');
74+
```
75+
6176
## 10.46.0
6277

6378
### Important Changes

0 commit comments

Comments
 (0)