Azure: Improved identification of Application Insights resouces (#106281)

Compare namespace to lowercase URL
pull/106365/head
Andreas Christou 3 weeks ago committed by GitHub
parent e47e04a1ca
commit e4c9d10bfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      pkg/tsdb/azuremonitor/loganalytics/azure-log-analytics-datasource.go

@ -114,7 +114,7 @@ func (e *AzureLogAnalyticsDatasource) ResourceRequest(rw http.ResponseWriter, re
}
return e.GetBasicLogsUsage(req.Context(), newUrl.String(), cli, rw, req.Body)
} else if strings.Contains(req.URL.Path, "/metadata") {
isAppInsights := strings.Contains(req.URL.Path, "Microsoft.Insights/components")
isAppInsights := strings.Contains(strings.ToLower(req.URL.Path), "microsoft.insights/components")
// Add necessary headers
if isAppInsights {
// metadata-format-v4 is not supported for AppInsights resources

Loading…
Cancel
Save