question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

monitor-query: LogsQueryClient custom endpoint incorrect scope

See original GitHub issue

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:

  1. Create a new LogsQueryClient instance with the endpoint parameter specified: const client = new LogsQueryClient(creds, { endpoint: "https://api.loganalytics.io" }).
  2. Run any request using client.queryWorkspace or client.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:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
xirzeccommented, May 27, 2022

@KarishmaGhiya If the fix is as simple as it looks, would you mind making a quick PR?

1reaction
xirzeccommented, May 27, 2022

Ah my mistake for not looking closely enough at the bug description! Thanks @qiaozha for pointing that out

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found