-
Notifications
You must be signed in to change notification settings - Fork 498
feat: Add MongoDB driver metadata #2240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: c7020d2 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| @@ -0,0 +1,8 @@ | |||
| --- | |||
| "@llamaindex/mongodb": minor | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file accidentally committed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, not an accident. Changesets is how this project manages versioning.
Here's a similar PR we are working on, which also has a similar change: langchain-ai/langgraphjs#1777
| ); | ||
| } | ||
| mongoClient.appendMetadata({ | ||
| name: "LLAMAINDEX_AZURE_COSMOS_VCORE_CHAT_STORE", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, we try and include the package version. But it isn't always feasible because it usually requires reading the package.json file, which some codebases don't like (require('./package.json').version).
I suggest adding the packages versions and asking the team what they think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
Looks like there's already some code that does this, will follow this approach: https://github.com/run-llama/LlamaIndexTS/blob/main/packages/providers/storage/azure/src/model/azure.ts#L153
@llamaindex/autotool
@llamaindex/community
@llamaindex/core
@llamaindex/env
@llamaindex/experimental
llamaindex
@llamaindex/node-parser
@llamaindex/readers
@llamaindex/tools
@llamaindex/wasm-tools
@llamaindex/workflow
@llamaindex/anthropic
@llamaindex/assemblyai
@llamaindex/aws
@llamaindex/clip
@llamaindex/cohere
@llamaindex/deepinfra
@llamaindex/deepseek
@llamaindex/discord
@llamaindex/excel
@llamaindex/fireworks
@llamaindex/google
@llamaindex/groq
@llamaindex/huggingface
@llamaindex/jinaai
@llamaindex/mistral
@llamaindex/mixedbread
@llamaindex/notion
@llamaindex/ollama
@llamaindex/openai
@llamaindex/ovhcloud
@llamaindex/perplexity
@llamaindex/portkey-ai
@llamaindex/replicate
@llamaindex/together
@llamaindex/vercel
@llamaindex/vllm
@llamaindex/voyage-ai
@llamaindex/xai
@llamaindex/astra
@llamaindex/azure
@llamaindex/chroma
@llamaindex/elastic-search
@llamaindex/firestore
@llamaindex/milvus
@llamaindex/mongodb
@llamaindex/pinecone
@llamaindex/postgres
@llamaindex/qdrant
@llamaindex/supabase
@llamaindex/upstash
@llamaindex/weaviate
commit: |
The PR incorporates MongoDB's wrapping client library specification for the connection handshake to allow library details to be included in the metadata written to mongos or mongod logs.
For example, this change would allow server-side logs to have driver info such:
{"driver":{"name":"nodejs|LLAMAINDEX_AZURE_COSMOS_VCORE_CHAT_STORE","version":"7.0.0"},"platform":"Node.js v25.0.0, LE","os":{"name":"darwin","architecture":"arm64","version":"24.6.0","type":"Darwin"}}For anyone hosting clusters with connections coming from different applications this can help differentiate connections and facilitate log analysis.