-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Monitor Query] move to tracing 1.0.0 #21260
[Monitor Query] move to tracing 1.0.0 #21260
Conversation
API change check for API changes have been detected in API changes - export interface ListMetricNamespacesOptions {
+ export interface ListMetricNamespacesOptions extends OperationOptions { |
namespace: "Microsoft.Monitor", | ||
packagePrefix: "Azure.Monitor.Query", | ||
packageName: "@azure/monitor-query", |
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 can add the package version here is as well
packageVersion: SDK_VERSION // from constants.ts
// maxPageSize: 2, | ||
// continuationToken: null | ||
// }), | ||
// client.listMetricNames("resourceUri") |
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.
Unsure about the accurate way of testing the list methods with the supportsTracing
. I put the error in the comment above cc: @maorleger @xirzec
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.
I think if you call next
it should work. byPage
itself is not an async function and doesn't make any calls. next
starts fetching data
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.
🚀 A few nits but LGTM tracing-wise. Thank you!
@@ -123,10 +130,10 @@ export class MetricsQueryClient { | |||
resourceUri: string, | |||
options: ListMetricDefinitionsOptions = {} | |||
): AsyncIterableIterator<Array<MetricDefinition>> { | |||
const segmentResponse = await this._definitionsClient.metricDefinitions.list( | |||
const segmentResponse = await tracingClient.withSpan("MetricsQueryClient.listSegmentOfMetricDefinitions",options, async (updatedOptions) => await this._definitionsClient.metricDefinitions.list( |
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.
I'm surprised prettier didn't format this? Or maybe it did and that's why build is failing I haven't checked...
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.
fixed the formatting
options | ||
), | ||
client.queryBatch([ | ||
{ |
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.
Nit: since we ignore any and all errors anyway, maybe it makes sense to just make this the smallest possible batch that sends a request. For example does client.queryBatch([])
send a request to the server? Having all of this in here adds noise otherwise
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.
I reduced it to one query.
/azp run js - monitor - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
API change check APIView has identified API level changes in this PR and created following API reviews. |
I think we might have to merge master to get changes from #21967 @mpodwysocki can you review this PR when you get a chance? |
83f7446
to
38815f8
Compare
…t supported in browser
No pipelines are associated with this pull request. |
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.
LGTM
Fixes #21245
Packages impacted by this PR
@azure/monitor-query
Issues associated with this PR
Describe the problem that is addressed by this PR
Upgrading tracing to 1.0.0 for monitor query and setting up tracing for monitor query APIs.
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists