Azure: Improve Azure Prometheus exemplars UI/UX (#97198)

* Add better error messaging

- Ensure it's clear to users what action needs to be taken if an operation ID cannot be found
- Add test

* Display resource picker for trace exemplar queries

* Remove unneeded test

* Update tests
This commit is contained in:
Andreas Christou
2025-01-09 11:33:47 +00:00
committed by GitHub
parent 42f6f917c9
commit 2860eb52d0
7 changed files with 126 additions and 109 deletions
@@ -625,6 +625,9 @@ func getCorrelationWorkspaces(ctx context.Context, baseResource string, resource
}()
if res.StatusCode/100 != 2 {
if res.StatusCode == 404 {
return AzureCorrelationAPIResponse{}, backend.DownstreamError(fmt.Errorf("requested trace not found by Application Insights indexing. Select the relevant Application Insights resource to search for the Operation ID directly"))
}
return AzureCorrelationAPIResponse{}, utils.CreateResponseErrorFromStatusCode(res.StatusCode, res.Status, body)
}
var data AzureCorrelationAPIResponse