-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
Currently, we lack visibility into the MongoDB-Langchain typescript integration usage. This ticket aims to enhance the integration by adding wrapping library metadata. We'll achieve this by passing additional metadata to MongoClient instances during their creation. For example in Python:
from pymongo import MongoClient from pymongo.driver_info import DriverInfo MongoClient(connection_string, driver=DriverInfo(name="Langchain", version="x.y.z"))
Note: Please make sure this doesn't overwrite any other metadata that we capture for reporting purposes.
Unknowns
- Do we have access to the client?
- What adjustments might we need to make to the driver/code to inject the metadata?
- Cross-reference the Python implementation
AC
- Make a PR against the Langchain repo to update the example code here: https://github.com/langchain-ai/langchainjs/blob/f73fb6ec68b5f39ef5c85c97b0c0ea998e540b0c/examples/src/memory/mongodb.ts#L7
- Add {metadata: { name: Langchain, version: x.x.x }} to the driver options in that example code and make sure it compiles.