microsoft / microsoft/Kusto-Explorer-VsCode

Log Analytics / Application Insights connections truncate the full proxy URI to the bare hostname

Open
#139 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
6
Forks
7
Avg merge
6d 10h
Merged PRs (30d)
3

Description

Description

When adding a Log Analytics workspace connection, the extension truncates the full URI and stores only the hostname. The saved connection becomes ade.loganalytics.io instead of the full workspace-scoped endpoint:

https://ade.loganalytics.io/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.operationalinsights/workspaces/<workspace-name>

ade.loganalytics.io is the Azure Data Explorer proxy front door, not a routable cluster endpoint on its own. Without the subscription/resource group/workspace path there is nothing for the proxy to route to, so the connection is unusable.

Steps to reproduce
  1. Add a connection using the full Log Analytics workspace URI above.
  2. Observe the stored connection is reduced to ade.loganalytics.io with no database.
Actual behaviour

The connection is saved as ade.loganalytics.io. Attempting to use it:

  • Running a query → Invalid host name ade.loganalytics.io
  • .show databases → returns nothing
  • Schema/database tree → empty

The same URI works correctly in Azure Data Explorer (web/desktop).

Expected behaviour

The full workspace-scoped URI is preserved so the workspace can be added as its own connection, with the workspace usable as a database.

Workaround

Proxy queries can be run by connecting to a working ADX cluster and scoping inline:

cluster('https://ade.loganalytics.io/subscriptions/<subscription-id>/resourcegroups/<resource-group-name>/providers/microsoft.operationalinsights/workspaces/<workspace-name>').database('<workspace-name>').SigninLogs
| take 5

Note the host connection must have a database selected, not just a cluster — otherwise the placeholder NetDefaultDB is sent and the query fails with Entity ID 'NetDefaultDB' of kind 'Database' was not found before reaching the proxy.

This works, but a separate first-class connection for the workspace would be much more useful.

Notes
  • There is no settings-based override — the only connection-related settings contributed are msKustoExplorer.defaultDomain and msKustoExplorer.connections.suppressKustoExplorerImportPrompt.
  • msKustoExplorer.addServer ignores arguments passed programmatically, so the connection can't be injected as a workaround.
Environment
  • Extension: ms-kusto.kusto-explorer-vscode v1.0.1
  • OS: Windows
Reference

https://learn.microsoft.com/en-us/azure/data-explorer/query-monitor-data

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the add-connection flow, including the msKustoExplorer.addServer entry point, and trace how the supplied Log Analytics URI is parsed and stored. Reproduce with the workspace-scoped URI from the report; done means the complete URI is preserved and the workspace can be used as its database rather than saving only ade.loganalytics.io.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript, vscode
Domain
database, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.