[release-12.0.2] Azure: Improved identification of Application Insights resouces (#106570)

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

Compare namespace to lowercase URL

(cherry picked from commit e4c9d10bfb)

* Fix feature toggle docs

* Oops
This commit is contained in:
Andreas Christou
2025-06-12 11:19:35 +01:00
committed by GitHub
parent 5739be39a4
commit 3df3c4b650
@@ -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