[BUG] Azure Monitor Query client: resourceId is missing in response #43841
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Monitor
Monitor, Monitor Ingestion, Monitor Query
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
resourceId field is missing in MetricsQueryResult object when calling method MetricsAsyncClient.queryResourcesWithResponse.
Since API allows to send request for server resource ids, it's required to have resourceIds back in response to be able to map metrics back to requested resources.
Exception or Stack Trace
Issue doesn't cause any exception in the SDK.
To Reproduce
Steps to reproduce the behavior:
Given the
MetricsAsyncClient
make a call to the APIIn the response you get MetricsQueryResourcesResult object which contains List<MetricsQueryResult>. Each MetricsQueryResult in response is missing resourceId field.
Code Snippet
Expected behavior
response contains list of MetricsQueryResult objects, each of them has resourceId (the same as specified in the original request).
Screenshots
As you can see on the screenshot (from the debug window) resourceId field is missing in the response.
Setup (please complete the following information):
Additional context
After issue troubleshooting I found, that the issue is related to
MetricsQueryResult
class constructor which is missing resourceId field. Because of this, field is missing when object MetricsQueryResult is created inMetricsHelper.mapToMetricsQueryResult
method.Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: