Skip to content

Conversation

@tnaum-ms
Copy link
Collaborator

@tnaum-ms tnaum-ms commented Dec 18, 2025

This pull request introduces version 0.6.3 of the DocumentDB for VS Code extension, focusing on performance improvements for Query Insights, enhanced telemetry for AI features, and important security updates for dependencies. The release also updates documentation and localization files to reflect these changes, and adds new debug data examples for development and troubleshooting.

Query Insights and AI Features:

  • Optimized the Query Insights feature to reuse existing executionStats from analysis, improving both performance and consistency of AI recommendations. The system now avoids redundant database queries and ensures insights are based on the same metrics shown to users. [1] [2] [3]
  • Improved telemetry and error handling for AI-driven features, including more detailed diagnostics when operations fail, and additional telemetry properties for monitoring preloaded data usage. [1] [2] [3] [4]

Dependency and Security Updates:

  • Upgraded @trpc/client and @trpc/server dependencies to address a high-severity security vulnerability related to prototype pollution.

Documentation and Localization:

  • Updated documentation to include release notes for v0.6.3 and detailed descriptions of the new improvements and fixes. [1] [2] [3]
  • Enhanced localization with new trace and error messages for Query Insights and AI features. [1] [2]

Debug Data and Internal Improvements:

  • Added new debug data files for various query scenarios to aid development and troubleshooting. [1] [2] [3]
  • Improved handling of explain plan verbosity: now uses allPlansExecution for Azure Cosmos DB vCore clusters and executionStats for others, providing richer plan data where available. [1] [2]

Version and Changelog Updates:

  • Bumped extension version to 0.6.3 and updated the changelog to summarize the latest improvements and fixes. [1] [2]

xingfan-msft and others added 30 commits December 3, 2025 08:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tnaum-ms tnaum-ms requested a review from a team as a code owner December 18, 2025 18:31
Copilot AI review requested due to automatic review settings December 18, 2025 18:31
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 releases version 0.6.3 from the next branch to main. The release focuses on optimizing Query Insights AI recommendations by reusing execution plans, improving telemetry coverage for AI features, and updating tRPC dependencies to address a security vulnerability.

Key changes:

  • Query Insights Stage 3 now reuses the execution plan from Stage 2 instead of running a redundant explain query, improving performance and ensuring consistency between displayed metrics and AI recommendations
  • Enhanced telemetry tracking across AI services (CopilotService, PromptTemplateService, QueryInsightsAIService) with detailed error codes and preloaded data tracking
  • Updated tRPC dependencies (@trpc/client and @trpc/server) from ~11.7.1 to ~11.8.0 to address a prototype pollution security vulnerability

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Bumped version to 0.6.3 and updated tRPC dependencies to ~11.8.0
package-lock.json Updated lockfile with new tRPC dependency versions
CHANGELOG.md Added 0.6.3 release notes documenting Query Insights optimization, telemetry improvements, and security update
docs/release-notes/0.6.md Added detailed release notes for v0.6.3 with feature descriptions and links to issues/PRs
docs/index.md Updated release version links to include 0.6.3
src/webviews/api/extension-server/trpc.ts Refactored middleware to inject telemetry into context and added publicProcedureWithTelemetry helper and WithTelemetry type
src/webviews/api/configuration/appRouter.ts Added optional telemetry to BaseRouterContext and created BaseRouterContextWithTelemetry type
src/webviews/documentdb/documentView/documentsViewRouter.ts Migrated to publicProcedureWithTelemetry and WithTelemetry<RouterContext>, fixed spelling of "parameters"
src/webviews/documentdb/collectionView/collectionViewRouter.ts Migrated all procedures to publicProcedureWithTelemetry, added platform telemetry tracking, removed minimum duration delays from Stage 2, added execution plan caching support for Stage 3
src/webviews/documentdb/collectionView/components/queryInsightsTab/QueryInsightsTab.tsx Moved minimum duration timing logic from backend to frontend for Stage 2
src/services/copilotService.ts Wrapped sendMessage in telemetry handler to track model usage and LLM errors
src/services/promptTemplateService.ts Added telemetry tracking for template load failures
src/services/ai/QueryInsightsAIService.ts Added executionPlan parameter to getOptimizationRecommendations, enhanced error telemetry with specific error codes for action failures
src/documentdb/ClusterSession.ts Added getRawExplainOutput method for cached execution plan retrieval, updated getExecutionStats to use allPlansExecution verbosity for vCore clusters
src/commands/llmEnhancedCommands/indexAdvisorCommands.ts Enhanced preloaded data handling to support optional collectionStats and indexStats, improved telemetry tracking for preloaded vs fetched data
src/documentdb/queryInsights/StagePropertyExtractor.test.ts Added comprehensive test suite for stage property extraction across multiple scenarios (collscan, query insights, sharded)
resources/debug/examples/*.json Added three new example JSON files for testing with allPlansExecution data
l10n/bundle.l10n.json Added localization strings for preloaded data messages and updated explain completion message

@tnaum-ms tnaum-ms merged commit 9f127a5 into main Dec 18, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants