-
Notifications
You must be signed in to change notification settings - Fork 171
chore: add telemetry properties for vector search and mcp auto-embed usage #796
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
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.
Pull request overview
This PR adds telemetry properties to track vector search and auto-embedding feature usage. The changes enable monitoring of preview features configuration and whether MCP server is generating embeddings for vector search operations.
Key Changes:
- Added two new telemetry properties (
previewFeatures,embeddingProviderConfigured) to Server events - Added
embeddingsGeneratedByproperty to Tool events to track auto-embedding usage - Added integration tests to verify telemetry emission for aggregate and insertMany tools
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/telemetry/types.ts | Added new telemetry type definitions and properties for tracking embeddings usage |
| src/server.ts | Added preview features and embedding provider configuration to server event properties |
| src/tools/mongodb/read/aggregate.ts | Implemented telemetry metadata resolution to track auto-embedding usage in aggregation |
| src/tools/mongodb/create/insertMany.ts | Implemented telemetry metadata resolution to track auto-embedding usage in bulk inserts |
| tests/integration/tools/mongodb/read/aggregate.test.ts | Added integration test to verify telemetry emission for auto-embedding in aggregate tool |
| tests/integration/tools/mongodb/create/insertMany.test.ts | Added integration test to verify telemetry emission for auto-embedding in insertMany tool |
Co-authored-by: Copilot <[email protected]>
Pull Request Test Coverage Report for Build 20167205836Details
💛 - Coveralls |
| read_only_mode?: TelemetryBoolSet; | ||
| disabled_tools?: string[]; | ||
| confirmation_required_tools?: string[]; | ||
| previewFeatures?: string[]; |
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.
note: while we can add arrays in telemetry, this really makes stuff like amplitude difficult as the values appear as one text with spaces normally.
ordering of strings is also a problem as you can't queries based on keys or position.
since this pattern is already stablished let's proceed, but ideally we should be removing arrays from segment events.
Proposed changes
This PR adds the following telemetry properties to Server events:
previewFeatures: Answers what preview features are being enabledembeddingProviderConfigured: Answers whether there is an embedding provider configured or notand adds another property
embeddingsGeneratedByto Tool events to answer whether MCP server auto-embeddings feature is being used or not.Checklist