-
Notifications
You must be signed in to change notification settings - Fork 494
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
Adding basic request diagnostics for V3 #615
Conversation
Microsoft.Azure.Cosmos/src/Resource/Settings/PointOperationStatistics.cs
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Resource/Settings/PointOperationStatistics.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Resource/Settings/CosmosDiagnostic.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Resource/Settings/CosmosDiagnostics.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Resource/Settings/CosmosDiagnostics.cs
Outdated
Show resolved
Hide resolved
Please include the new contracts and usage into the description. |
Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs
Outdated
Show resolved
Hide resolved
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.
Why not auto populate always 'PopulateQueryMetrics'?
Summary of offline discussion: public class ResponseMessage
{
....
public string GetDiagnostics()
{
return this.cosmosDiag.ToString();
}
}
Example diagnostic string:
{
Summary: E200,
Diag: {
...
}
.....
}
internal CosmosDiagnostics
{
} |
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.
Please refresh contract as listed in comments
Microsoft.Azure.Cosmos/src/Query/ExecutionComponent/AggregateDocumentQueryExecutionComponent.cs
Outdated
Show resolved
Hide resolved
I realise this has been merged but I can't find any technical documentation on it. I tried to use this to get the total results for paging. Ie user is viewing 1-100 of 1000 items type scenario. However I set up 3 items in the db - the first 2 had property Key1 set to "A" and the third Key1 set to "B". If I search for items where Key1 = "A" and look at the diagnostics object and inside that the query stats then the RetrievedDocumentCount it is 3 and not 2. The third item did not qualify for the query. Is this expected bahaviour? If so I cannot use it to get a total item count for the paging scenario. This is compounded by https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/36142468-make-count-aware-of-indexes never having been implemented because we have to have a second query to count the total number of qualifying items for search criteria and it performs woefully because no indexes are used for the count query so this is causing huge performance issues. |
@AlanMacdonald can you create a new issue for this? Commenting on a closed PR is difficult to track. This might be fixed by one of the several changes that will go out in the next release. |
This PR will add the basic point operation statistics and query metrics for both type and stream api.
We are exposing GetDiagnostics() on the responses for users to get the diagnostic string.
closes #645