Skip to content

Conversation

@himanshusinghs
Copy link
Collaborator

@himanshusinghs himanshusinghs commented Dec 11, 2025

Proposed changes

This PR adds the following telemetry properties to Server events:

  1. previewFeatures: Answers what preview features are being enabled
  2. embeddingProviderConfigured: Answers whether there is an embedding provider configured or not

and adds another property embeddingsGeneratedBy to Tool events to answer whether MCP server auto-embeddings feature is being used or not.

Checklist

@himanshusinghs himanshusinghs requested a review from a team as a code owner December 11, 2025 22:26
Copilot AI review requested due to automatic review settings December 11, 2025 22:26
@himanshusinghs himanshusinghs added the no-title-validation Add this label to disable the title check for this PR. label Dec 11, 2025
Copy link
Contributor

Copilot AI left a 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 embeddingsGeneratedBy property 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 <175728472+Copilot@users.noreply.github.com>
@coveralls
Copy link
Collaborator

coveralls commented Dec 11, 2025

Pull Request Test Coverage Report for Build 20167205836

Details

  • 25 of 35 (71.43%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 80.089%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/tools/mongodb/create/insertMany.ts 9 13 69.23%
src/tools/mongodb/read/aggregate.ts 14 20 70.0%
Totals Coverage Status
Change from base Build 20137610391: 0.06%
Covered Lines: 6665
Relevant Lines: 8239

💛 - Coveralls

read_only_mode?: TelemetryBoolSet;
disabled_tools?: string[];
confirmation_required_tools?: string[];
previewFeatures?: string[];
Copy link
Collaborator

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.

@himanshusinghs himanshusinghs merged commit fd0e4b6 into main Dec 12, 2025
17 checks passed
@himanshusinghs himanshusinghs deleted the chore/preview-feature-telemetry branch December 12, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Add this label to disable the title check for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants