Home > Software engineering >  Cannot find my azure endpoint for LogQueryClient
Cannot find my azure endpoint for LogQueryClient

Time:12-22

I'm trying to access logs from my application insights from code via LogsQueryClient. In documentation I see that I would need endpoint to my azure monitor(which is logical) but I'm unable to find it in azure and when googling I had no luck finding what I need or at least didn't find something that would look to me like answer to my problem. enter image description here

Then query like this:

logsQueryClient = new LogsQueryClient(new DefaultAzureCredential());
var response = await logsQueryClient.QueryWorkspaceAsync("2c6892c2-6c05-49f8-a88c-********", "apprequests | take 10", new QueryTimeRange(TimeSpan.FromHours(1)));
  • Related