Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
48d1463
add telemetry
xingfan-msft Dec 3, 2025
c698437
Delete .devcontainer/devcontainer.json
xingfan-git Dec 3, 2025
789b324
revert extra changes introduced from other branch
xingfan-msft Dec 3, 2025
69a4865
Merge branch 'dev/xingfan/addtelemetry' of https://github.com/microso…
xingfan-msft Dec 3, 2025
2020c2f
resue execution stats data from stage2
xingfan-git Dec 12, 2025
cada6ff
l10n
xingfan-git Dec 12, 2025
3719df3
Sync next with main (#424)
tnaum-ms Dec 12, 2025
7e6041b
resolve comment
xingfan-git Dec 15, 2025
90e6ee3
resolve conflict
xingfan-git Dec 15, 2025
a8c908f
chore: added telemetry for scenarios when data is preloaded
tnaum-ms Dec 15, 2025
41b30b1
chore: added trace output for scenarios when data is preloaded
tnaum-ms Dec 15, 2025
9fa4246
chore: added trace output for scenarios when data is preloaded
tnaum-ms Dec 15, 2025
4423127
fix: improved error logging
tnaum-ms Dec 15, 2025
e6c2a0d
Merge branch 'release/063-bundle' into dev/xingfan/addtelemetry
tnaum-ms Dec 15, 2025
21cafd6
Add telemetry for LLM relates calls (#411)
tnaum-ms Dec 15, 2025
31d3a45
fix: measure the count of ai actionable recommendations
tnaum-ms Dec 16, 2025
bc3245e
add tests for extractor
xingfan-git Dec 17, 2025
50d3c66
Merge branch 'dev/xingfan/useextensiondata-clean' of https://github.c…
xingfan-git Dec 17, 2025
40944a5
feat: added WithTelemetry and publicProcedureWithTelemetry helper to …
tnaum-ms Dec 18, 2025
2349f4f
applied withTelemetry to webview calls
tnaum-ms Dec 18, 2025
6126fe2
simplified telemetry on webviews
tnaum-ms Dec 18, 2025
d996419
chore: moved ux-related code to the front-end
tnaum-ms Dec 18, 2025
02609ef
Revert "Delete .devcontainer/devcontainer.json"
tnaum-ms Dec 18, 2025
4048b89
Revert "revert extra changes introduced from other branch"
tnaum-ms Dec 18, 2025
e0d02ff
chore: removed obsolete files
tnaum-ms Dec 18, 2025
1732162
Merge branch 'release/063-bundle' into dev/xingfan/useextensiondata-c…
tnaum-ms Dec 18, 2025
6dfbcad
Update src/webviews/api/extension-server/trpc.ts
tnaum-ms Dec 18, 2025
8c34574
reuse execution stats data from stage2 (#423)
tnaum-ms Dec 18, 2025
5d50874
typos
tnaum-ms Dec 18, 2025
f889445
Merge branch 'release/063-bundle' into dev/tnaum/query-insights-perf-…
tnaum-ms Dec 18, 2025
ae5cc38
chore: dependency update trpc
tnaum-ms Dec 18, 2025
4927033
API: Improved Telemetry Support in Web Views (#429)
tnaum-ms Dec 18, 2025
392a286
Merge branch 'release/063-bundle' into 430-update-trpc-dependencies
tnaum-ms Dec 18, 2025
62771e7
chore: update trpc dependencies (v11.7.1 -> v11.8.0) (#431)
tnaum-ms Dec 18, 2025
38fa5b3
doc: changelog and release notes for 0.6.3
tnaum-ms Dec 18, 2025
620c23e
version bump to `0.6.3`
tnaum-ms Dec 18, 2025
29a0be5
Release `0.6.3` (#425)
tnaum-ms Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 0.6.3

### Improvements

- **Query Insights**: The Query Insights feature has been updated to use the available `executionStats` instead of running the analysis in the AI context, improving performance and reliability. [#404](https://github.com/microsoft/vscode-documentdb/issues/404), [#423](https://github.com/microsoft/vscode-documentdb/pull/423)
- **API Telemetry Support**: Enhanced telemetry support in web views for better monitoring and diagnostics. [#429](https://github.com/microsoft/vscode-documentdb/pull/429)
- **Dependency Security Update**: Updated `tRPC` dependencies to address a security vulnerability. [#430](https://github.com/microsoft/vscode-documentdb/issues/430), [#431](https://github.com/microsoft/vscode-documentdb/pull/431)

## 0.6.2

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The User Manual provides guidance on using DocumentDB for VS Code. It contains d

Explore the history of updates and improvements to the DocumentDB for VS Code extension. Each release brings new features, enhancements, and fixes to improve your experience.

- [0.6](./release-notes/0.6), [0.6.1](./release-notes/0.6#patch-release-v061), [0.6.2](./release-notes/0.6#patch-release-v062)
- [0.6](./release-notes/0.6), [0.6.1](./release-notes/0.6#patch-release-v061), [0.6.2](./release-notes/0.6#patch-release-v062), [0.6.3](./release-notes/0.6#patch-release-v063)
- [0.5](./release-notes/0.5), [0.5.1](./release-notes/0.5#patch-release-v051), [0.5.2](./release-notes/0.5#patch-release-v052)
- [0.4](./release-notes/0.4), [0.4.1](./release-notes/0.4#patch-release-v041)
- [0.3](./release-notes/0.3), [0.3.1](./release-notes/0.3#patch-release-v031)
Expand Down
27 changes: 27 additions & 0 deletions docs/release-notes/0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,30 @@ These upgrades ensure the extension remains fast, secure, and aligned with the l

See the full changelog entry for this release:
➡️ [CHANGELOG.md#062](https://github.com/microsoft/vscode-documentdb/blob/main/CHANGELOG.md#062)

---

## Patch Release v0.6.3

This patch release brings performance improvements to Query Insights, enhances telemetry, and includes important dependency updates to address a security vulnerability.

### What's Changed in v0.6.3

#### 💠 **Optimized Query Insights AI Recommendations** ([#404](https://github.com/microsoft/vscode-documentdb/issues/404), [#423](https://github.com/microsoft/vscode-documentdb/pull/423))

We've optimized the AI-powered recommendation engine in Query Insights to improve performance and consistency. Previously, execution statistics were collected twice, leading to minor discrepancies between the data shown in the analysis and the AI-generated recommendations.

This update ensures that the AI assistant reuses the existing `executionStats` from the detailed analysis stage (Stage 2), avoiding a redundant database query. This not only makes the recommendation process faster but also guarantees that the insights are based on the exact same metrics displayed to the user.

#### 💠 **Improved Telemetry for AI Features** ([#429](https://github.com/microsoft/vscode-documentdb/pull/429))

We've improved error handling for AI-driven features, including Query Insights and Copilot services. This update provides more detailed diagnostic information when an operation fails, such as creating an index or getting a response from the AI. These changes allow us to diagnose and resolve issues more effectively, improving the stability of these features.

#### 💠 **Security Update for tRPC Dependencies** ([#430](https://github.com/microsoft/vscode-documentdb/issues/430), [#431](https://github.com/microsoft/vscode-documentdb/pull/431))

We've upgraded our tRPC dependencies (`@trpc/client` and `@trpc/server`) to address a high-severity vulnerability related to possible prototype pollution. This update ensures the extension remains secure and incorporates the latest fixes.

### Changelog

See the full changelog entry for this release:
➡️ [CHANGELOG.md#063](https://github.com/microsoft/vscode-documentdb/blob/main/CHANGELOG.md#063)
7 changes: 6 additions & 1 deletion l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,23 @@
"[Query Insights AI] getCollectionStats completed in {ms}ms": "[Query Insights AI] getCollectionStats completed in {ms}ms",
"[Query Insights AI] getIndexStats completed in {ms}ms": "[Query Insights AI] getIndexStats completed in {ms}ms",
"[Query Insights AI] listIndexes completed in {ms}ms": "[Query Insights AI] listIndexes completed in {ms}ms",
"[Query Insights AI] Using preloaded collection stats": "[Query Insights AI] Using preloaded collection stats",
"[Query Insights AI] Using preloaded execution plan": "[Query Insights AI] Using preloaded execution plan",
"[Query Insights AI] Using preloaded index stats": "[Query Insights AI] Using preloaded index stats",
"[Query Insights Stage 1] Completed: indexes={idx}, collScan={scan}": "[Query Insights Stage 1] Completed: indexes={idx}, collScan={scan}",
"[Query Insights Stage 1] explain(queryPlanner) completed in {ms}ms": "[Query Insights Stage 1] explain(queryPlanner) completed in {ms}ms",
"[Query Insights Stage 1] Query Insights is not supported on Azure Cosmos DB for MongoDB (RU) clusters.": "[Query Insights Stage 1] Query Insights is not supported on Azure Cosmos DB for MongoDB (RU) clusters.",
"[Query Insights Stage 1] Started for {db}.{collection}": "[Query Insights Stage 1] Started for {db}.{collection}",
"[Query Insights Stage 1] Using debug data file": "[Query Insights Stage 1] Using debug data file",
"[Query Insights Stage 2] Completed: execTime={time}ms, returned={ret}, examined={ex}, ratio={ratio}": "[Query Insights Stage 2] Completed: execTime={time}ms, returned={ret}, examined={ex}, ratio={ratio}",
"[Query Insights Stage 2] explain(executionStats) completed in {ms}ms": "[Query Insights Stage 2] explain(executionStats) completed in {ms}ms",
"[Query Insights Stage 2] explain completed in {ms}ms": "[Query Insights Stage 2] explain completed in {ms}ms",
"[Query Insights Stage 2] Query execution failed: {error}": "[Query Insights Stage 2] Query execution failed: {error}",
"[Query Insights Stage 2] Started for {db}.{collection}": "[Query Insights Stage 2] Started for {db}.{collection}",
"[Query Insights Stage 2] Using debug data file": "[Query Insights Stage 2] Using debug data file",
"[Query Insights Stage 3] AI service completed in {ms}ms (requestKey: {key})": "[Query Insights Stage 3] AI service completed in {ms}ms (requestKey: {key})",
"[Query Insights Stage 3] Completed: {count} improvement cards generated (requestKey: {key})": "[Query Insights Stage 3] Completed: {count} improvement cards generated (requestKey: {key})",
"[Query Insights Stage 3] Started for {db}.{collection} (requestKey: {key})": "[Query Insights Stage 3] Started for {db}.{collection} (requestKey: {key})",
"[Query Insights Stage 3] Using cached execution plan from Stage 2 (requestKey: {key})": "[Query Insights Stage 3] Using cached execution plan from Stage 2 (requestKey: {key})",
"{0} tenants available ({1} signed in)": "{0} tenants available ({1} signed in)",
"{countMany} documents have been deleted.": "{countMany} documents have been deleted.",
"{countOne} document has been deleted.": "{countOne} document has been deleted.",
Expand Down Expand Up @@ -342,6 +346,7 @@
"Failed to gather schema information: {message}": "Failed to gather schema information: {message}",
"Failed to get optimization recommendations from index advisor.": "Failed to get optimization recommendations from index advisor.",
"Failed to get public IP": "Failed to get public IP",
"Failed to get response from language model": "Failed to get response from language model",
"Failed to hide index.": "Failed to hide index.",
"Failed to initialize Azure management clients": "Failed to initialize Azure management clients",
"Failed to load {0}": "Failed to load {0}",
Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vscode-documentdb",
"version": "0.6.2",
"version": "0.6.3",
"aiKey": "0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255",
"publisher": "ms-azuretools",
"displayName": "DocumentDB for VS Code",
Expand Down Expand Up @@ -161,8 +161,8 @@
"@microsoft/vscode-azureresources-api": "~2.5.0",
"@monaco-editor/react": "~4.7.0",
"@mongodb-js/explain-plan-helper": "1.4.24",
"@trpc/client": "~11.7.1",
"@trpc/server": "~11.7.1",
"@trpc/client": "~11.8.0",
"@trpc/server": "~11.8.0",
"@vscode/l10n": "~0.0.18",
"antlr4ts": "^0.5.0-alpha.4",
"bson": "~7.0.0",
Expand Down
36 changes: 36 additions & 0 deletions resources/debug/examples/collscan-stage2-allplans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"_debug_active": false,
"_instructions": "Set _debug_active to true to activate this override. This file contains a MongoDB explain('executionStats') response with COLLSCAN.",
"explainVersion": 2,
"command": "db.runCommand({explain: { 'find' : 'f_pos', 'filter' : { 'title' : { '$regex' : 'iwg' } } }})",
"explainCommandPlanningTimeMillis": 0.228,
"explainCommandExecTimeMillis": 1275.03,
"dataSize": "9400 bytes",
"queryPlanner": {
"namespace": "try_on_new_million.f_pos",
"winningPlan": {
"stage": "COLLSCAN",
"runtimeFilterSet": [{ "$regex": { "title": "iwg" } }],
"estimatedTotalKeysExamined": 333333
}
},
"executionStats": {
"nReturned": 235,
"executionTimeMillis": 1250.332,
"executionStartAtTimeMillis": 0.085,
"totalDocsExamined": 1000000,
"totalKeysExamined": 235,
"executionStages": {
"stage": "COLLSCAN",
"nReturned": 235,
"executionTimeMillis": 1250.332,
"executionStartAtTimeMillis": 0.085,
"totalDocsExamined": 1000000,
"totalKeysExamined": 235,
"totalDocsRemovedByRuntimeFilter": 999765,
"numBlocksFromCache": 5282,
"numBlocksFromDisk": 7064
}
},
"ok": 1
}
66 changes: 66 additions & 0 deletions resources/debug/examples/query-insights-stage2-allplans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"_debug_active": false,
"_instructions": "Set _debug_active to true to activate this override. This file contains a MongoDB explain('executionStats') response with FETCH and IXSCAN stages.",
"explainVersion": 2,
"command": "db.runCommand({explain: { 'find' : 'f_neg', 'filter' : { 'title' : { '$regex' : 'iwg' } } }})",
"explainCommandPlanningTimeMillis": 2.029,
"explainCommandExecTimeMillis": 1673.916,
"dataSize": "9400 bytes",
"queryPlanner": {
"namespace": "try_on_new_million.f_neg",
"winningPlan": {
"stage": "FETCH",
"estimatedTotalKeysExamined": 333333,
"inputStage": {
"stage": "IXSCAN",
"indexName": "title_1",
"isBitmap": true,
"indexUsage": [
{
"indexName": "title_1",
"isMultiKey": false,
"bounds": ["[\"title\": [\"\", { })]"]
}
],
"indexFilterSet": [{ "$regex": { "title": "iwg" } }],
"estimatedTotalKeysExamined": 10000
}
}
},
"executionStats": {
"nReturned": 235,
"executionTimeMillis": 1645.04,
"executionStartAtTimeMillis": 1625.541,
"totalDocsExamined": 235,
"totalKeysExamined": 235,
"executionStages": {
"stage": "FETCH",
"nReturned": 235,
"executionTimeMillis": 1644.9950000000001,
"executionStartAtTimeMillis": 1625.539,
"totalDocsExamined": 235,
"totalKeysExamined": 235,
"exactBlocksRead": 231,
"numBlocksFromCache": 231,
"numBlocksFromDisk": 9806,
"inputStage": {
"stage": "IXSCAN",
"nReturned": 235,
"executionTimeMillis": 1625.406,
"executionStartAtTimeMillis": 1625.406,
"indexName": "title_1",
"indexUsage": [
{
"indexName": "title_1",
"scanLoops": 998383,
"scanType": "ordered",
"scanKeys": ["key 1: [(isInequality: true, estimatedEntryCount: 235)]"]
}
],
"totalKeysExamined": 235,
"numBlocksFromDisk": 9806
}
}
},
"ok": 1
}
38 changes: 38 additions & 0 deletions resources/debug/examples/sharded-stage2-allplans.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"_debug_active": false,
"_instructions": "Set _debug_active to true to activate this override. This file contains a MongoDB explain('executionStats') response for a sharded collection.",
"explainVersion": 2,
"command": "db.runCommand({explain: { 'find' : 'f_sharded', 'filter' : { 'title' : { '$regex' : 'iwg' } } }})",
"explainCommandPlanningTimeMillis": 0.212,
"explainCommandExecTimeMillis": 353.938,
"dataSize": "9400 bytes",
"queryPlanner": {
"namespace": "try_on_new_million.f_sharded",
"winningPlan": {
"stage": "COLLSCAN",
"indexName": "_id_",
"direction": "Forward",
"runtimeFilterSet": [{ "$regex": { "title": "iwg" } }],
"estimatedTotalKeysExamined": 1
}
},
"executionStats": {
"nReturned": 235,
"executionTimeMillis": 330.589,
"executionStartAtTimeMillis": 0.133,
"totalDocsExamined": 1000000,
"totalKeysExamined": 235,
"executionStages": {
"stage": "COLLSCAN",
"nReturned": 235,
"executionTimeMillis": 330.589,
"executionStartAtTimeMillis": 0.133,
"totalDocsExamined": 1000000,
"indexName": "_id_",
"totalKeysExamined": 235,
"totalDocsRemovedByRuntimeFilter": 999765,
"numBlocksFromCache": 18374
}
},
"ok": 1
}
Loading