monitor-query: LogsQueryClient custom endpoint incorrect scope
See original GitHub issue- @azure/arm-monitor:
- 7.0.0:
- Windows 10:
- nodejs
- v16.13.2:
- browser
- name/version:
- typescript
- version:
- Is the bug related to documentation in
- README.md
- source code documentation
- SDK API docs on https://docs.microsoft.com
Describe the bug
When creating a LogsQueryClient
with endpoint
specified in the options
parameter, the scope is incorrectly set. This can be found on line 59 of logsQueryClient.ts
, it needs to be changed from:
scope = `${options?.endpoint}./default`;
to
scope = `${options?.endpoint}/.default`;
To Reproduce Steps to reproduce the behavior:
- Create a new
LogsQueryClient
instance with the endpoint parameter specified:const client = new LogsQueryClient(creds, { endpoint: "https://api.loganalytics.io" })
. - Run any request using
client.queryWorkspace
orclient.queryBatch
Expected behavior The query is authenticated successfully.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Azure Monitor Query client library for Java | Microsoft Learn
Custom metrics can have up to 10 dimensions. Examples. Logs query. Map logs query results to a model; Handle logs query response. Batch...
Read more >Azure SDK for JavaScript (July 2021)
Monitor Query 1.0.0-beta.2 Changelog. Fixing issue using non-commercial clouds, where it wasn't possible to pass in an endpoint and custom scope, ...
Read more >Azure Monitor Query client library for .NET
Uri endpoint = new Uri("https://api.loganalytics.io"); string workspaceId = "<workspace_id>"; LogsQueryClient client = new LogsQueryClient(endpoint, ...
Read more >Azure.Monitor.Query 1.1.0 - NuGet
Logs query. You can query logs using the LogsQueryClient.QueryWorkspaceAsync method. The result is returned as a table with a collection of rows ...
Read more >azure-monitor-query 1.0.3 - PyPI
Microsoft Azure Monitor Query Client Library for Python. ... azure.identity import DefaultAzureCredential from azure.monitor.query import LogsQueryClient, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@KarishmaGhiya If the fix is as simple as it looks, would you mind making a quick PR?
Ah my mistake for not looking closely enough at the bug description! Thanks @qiaozha for pointing that out