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

Compare namespace to lowercase URL
This commit is contained in:
Andreas Christou
2025-06-05 11:03:34 +01:00
committed by GitHub
parent e47e04a1ca
commit e4c9d10bfb
@@ -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