-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add Javadocs for Monitor Query #38475
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
Conversation
|
API change check API changes are not detected in this pull request. |
jairmyree
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @g2vinay
| * <p><strong>Instantiating an asynchronous Logs query Client</strong></p> | ||
| * <p>Provides an asynchronous service client for querying logs in the Azure Monitor Service.</p> | ||
| * | ||
| * <p>The LogsQueryClient is an asynchronous client that provides methods to execute Kusto queries against |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LogsQueryAsyncClient
| * <p>Fluent builder for creating instances of {@link LogsQueryClient} and {@link LogsQueryAsyncClient}.</p> | ||
| * | ||
| * <p><strong>Instantiating an asynchronous Logs query Client</strong></p> | ||
| * <p>The LogsQueryClientBuilder is responsible for authenticating a building instances of {@link LogsQueryClient} and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for authenticating should be removed
| * <!-- end com.azure.monitor.query.LogsQueryAsyncClient.instantiation --> | ||
| * | ||
| * <p><strong>Instantiating a synchronous Logs query Client</strong></p> | ||
| * <p>The following sample shows instantiating a synchronous Logs query Client using Token Credential</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client -> client and using Token Credential should be updated to using {@link TokenCredential}
| * of a system at a particular time. The MetricsQueryClient provides synchronous implementations of methods that query | ||
| * metrics from your Azure services.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be about the async client.
| * | ||
| * <p> | ||
| * Authenticating and building MetricsQueryAsyncClient instances are done through {@link MetricsQueryClientBuilder}. | ||
| * The following sample shows how to build a new MetricsQueryClient instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MetricsQueryClient -> MetricsQueryAsyncClient
| */ | ||
| public MetricsQueryResourcesOptions() { } | ||
|
|
||
| private String rollupBy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constructor should be below this property.
| /** | ||
| * Package containing clients for querying logs and metrics from Azure Monitor. | ||
| * <p>Azure Monitor Query service is a powerful tool that allows you to query and analyze log data from various sources | ||
| * in Azure. It is built on top of the Kusto Query Language (KQL), which is a powerful query language that allows you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only logs query uses Kusto Query Language. Metrics queries don't. So, we should update this doc to differentiate.
| * to perform complex queries on large datasets. With Azure Monitor Query, you can easily search and analyze | ||
| * log data from various sources, including virtual machines, containers, and applications.</p> | ||
| * | ||
| * <p>Azure Monitor Query java client library is a library that allows you to execute read-only queries against |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Azure Monitor Query java client library allows you to execute
| * | ||
| * <h2>Getting Started</h2> | ||
| * | ||
| * <p>In order to interact with the Monitor service you'll need to create an instance of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interact with the Azure Monitor service
| * <p>The sample below shows how to query logs from the last 24 hours</p> | ||
| * | ||
| * <!-- src_embed com.azure.monitor.query.LogsQueryClient.query#String-String-QueryTimeInterval --> | ||
| * <pre> | ||
| * LogsQueryResult queryResult = logsQueryClient.queryWorkspace("{workspace-id}", "{kusto-query}", | ||
| * QueryTimeInterval.LAST_DAY); | ||
| * for (LogsTableRow row : queryResult.getTable().getRows()) { | ||
| * System.out.println(row.getRow() | ||
| * .stream() | ||
| * .map(LogsTableCell::getValueAsString) | ||
| * .collect(Collectors.joining(","))); | ||
| * } | ||
| * </pre> | ||
| * <!-- end com.azure.monitor.query.LogsQueryClient.query#String-String-QueryTimeInterval --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a sample for querying metrics too if we are going to add a sample for querying logs here.
Revamps Javadocs for Azure Monitor Query.