Hey Guys,
Need some help here. I am trying to fetch logs from Application Insights using Java ( will use Kusto query) within. Initially I thought I can do this by using Azure Log Analytics API (https://docs.microsoft.com/en-us/azure/azure-monitor/logs/api/overview) however it doesn't have any specific example or maybe I am not looking in the right direction. Also, I did find "Tenant Id" and Client Id "Application Id" but we don't have any client secret as we are using certificates.
Can somebody please help me or point me in the right direction.
I am expecting something like below:
LogsQueryClient logsQueryClient = new LogsQueryClientBuilder()
.credential(new DefaultAzureCredentialBuilder().build())
.buildClient();
LogsQueryResult queryResults = logsQueryClient.queryWorkspace("{workspace-id}", "kusto query string",
new QueryTimeInterval(Duration.ofDays(1)));
for (LogsTableRow row : queryResults.getTable().getRows()) {
System.out.println(row.getColumnValue("TransactionId") + " " + row.getColumnValue("EventReason"));
}