Skip to content
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

Query: Adds PopulateIndexMetrics request options #2612

Merged
merged 16 commits into from
Sep 10, 2021
Merged

Query: Adds PopulateIndexMetrics request options #2612

merged 16 commits into from
Sep 10, 2021

Conversation

leminh98
Copy link
Contributor

@leminh98 leminh98 commented Jul 13, 2021

Pull Request Template

Description

This PR adds the option for customer to enable PopulateIndexMetrics in query request options. This allows customer to obtain the index utilization of their query. The information is aggregated and automatically showed up in QueryMetrics once this request option is enabled. Please note that enabling this incurs overhead, so please set it only during debugging. It also adds a field called IndexMetrics to FeedResponse to expose the result to users. The information looks like this:

 Index Utilization Information
  Utilized Single Indexes
    Index Spec: /name/?
    Index Impact Score: High
    ---
    Index Spec: /age/?
    Index Impact Score: High
    ---
  Potential Single Indexes
  Utilized Composite Indexes
  Potential Composite Indexes
    Index Spec: /name ASC, /age ASC
    Index Impact Score: High
    ---

Type of change

  • [] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] This change requires a documentation update

Closing issues

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@j82w j82w changed the title Query: [Index Advisor] Added PopulateIndexMetrics request options Query: [Index Advisor] Adds PopulateIndexMetrics request options Jul 13, 2021
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

@j82w j82w changed the title Query: [Index Advisor] Adds PopulateIndexMetrics request options Query Index Advisor: Adds PopulateIndexMetrics request options Jul 13, 2021
@github-actions github-actions bot dismissed stale reviews from themself July 13, 2021 11:33

All good!

j82w
j82w previously requested changes Jul 13, 2021
Copy link
Contributor

@j82w j82w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blocking for tests and how users can access this information

@leminh98 leminh98 changed the title Query Index Advisor: Adds PopulateIndexMetrics request options Query: Adds PopulateIndexMetrics request options Jul 13, 2021
sboshra
sboshra previously approved these changes Jul 13, 2021
Copy link
Contributor

@sboshra sboshra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@sboshra
Copy link
Contributor

sboshra commented Sep 3, 2021

    /// <returns>An instance of an Enumerator</returns>

this should be
///


Refers to: Microsoft.Azure.Cosmos/src/Query/v3Query/FeedResponse.cs:53 in c65334f. [](commit_id = c65334f, deletion_comment = False)

sboshra
sboshra previously approved these changes Sep 3, 2021
Copy link
Contributor

@sboshra sboshra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@j82w j82w dismissed their stale review September 8, 2021 12:25

Unblocking based on discussion

sboshra
sboshra previously approved these changes Sep 10, 2021
@j82w j82w merged commit 4eb8e20 into master Sep 10, 2021
@j82w j82w deleted the IndexAdvisorV3 branch September 10, 2021 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants