Skip to content

Query Method Documentation Out of Date? #49113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ay-azara opened this issue Mar 27, 2025 · 5 comments
Closed

Query Method Documentation Out of Date? #49113

ay-azara opened this issue Mar 27, 2025 · 5 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@ay-azara
Copy link

ay-azara commented Mar 27, 2025

Library name and version

Azure.Monitory.Query Latest

Query/Question

https://learn.microsoft.com/en-us/dotnet/api/azure.monitor.query.logsqueryclient.queryresourceasync?view=azure-dotnet

Sorry if I'm missing something obvious but is this documentation out of date? QueryResourceAsync() and company return Response<IReadOnlyList<LogsQueryResult>> not Response<LogsQueryResult> so none of these examples are usable, as far as I can tell. At least, not without indexing the first result out, but are these methods supposed to return multiple results instead of just one?

Side note: If you have any examples of error handling that would also be cool

Environment

No response

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels Mar 27, 2025
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @thomasp98296.

Copy link

Hello @ay-azara. I'm an AI assistant for the azure-sdk-for-net repository. I have some suggestions that you can try out while the team gets back to you.

• The current implementation of QueryResourceAsync() now returns a Response<IReadOnlyList<LogsQueryResult>> rather than a single LogsQueryResult. This change enables support for multiple query results—but it does mean that existing code examples may no longer work as written.

• The documentation at QueryResourceAsync API reference appears to be out of date, and we’re reviewing this discrepancy.

• In the meantime, you can update your code to work with the new return type (i.e. iterate over the collection in the IReadOnlyList<LogsQueryResult>), and we recommend filing feedback on the documentation if you haven’t already.

• We appreciate the feedback and are working to ensure our documentation examples align with the latest SDK changes.

The team will get back to you shortly, hopefully this helps in the meantime.

@jsquire jsquire removed the Service Attention Workflow: This issue is responsible by Azure service team. label Mar 27, 2025
@jsquire
Copy link
Member

jsquire commented Mar 27, 2025

//cc: @scottaddie

@jsquire
Copy link
Member

jsquire commented Mar 27, 2025

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@ay-azara
Copy link
Author

Sorry, I must have been having a dunce moment when I opened this. I'm not very familiar with C# and it seems I was using Task<Response<IReadOnlyList<T>>> QueryResourceAsync<T> rather than Task<Response<LogsQueryResult>> QueryResourceAsync which is what I was looking for. The docs are fine the issue was me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants