-
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
Add GetClientElapsedTime to CosmosDiagnostics #1268
Conversation
…nostics/properties
…t option not getting set for database read and delete stream.
#458 update description to the scope of the change. |
Batch diagnostics: Diagnostics duplication should solve it no? |
Microsoft.Azure.Cosmos/src/Batch/BatchAsyncContainerExecutor.cs
Outdated
Show resolved
Hide resolved
Pulling in ClientReqeustId inside might actually confuse CX that its actually sent uses E2E and might be source of future CRI's. If its for application tracing/correlation, then application can trace it explicitly (yes its more work but straightforward). |
/// <summary> | ||
/// Contains the cosmos diagnostic information for the current request to Azure Cosmos DB service. | ||
/// </summary> | ||
public abstract class CosmosDiagnostics | ||
{ | ||
/// <summary> | ||
/// This represent the current elapsed latency of the 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.
request [](start = 62, length = 7)
request: qualify it very explicitly that its E2E elapsed time.
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 check the updated text
Microsoft.Azure.Cosmos/src/Diagnostics/CosmosDiagnosticsContextCore.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/DotNetSDKAPI.json
Outdated
Show resolved
Hide resolved
public abstract string UserAgent { get; protected set; } | ||
|
||
internal abstract CosmosDiagnostics Diagnostics { get; } |
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 internal if the class in internal?
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.
It makes it easier to read. You don't have to scroll to the top to see if the class is internal.
Microsoft.Azure.Cosmos/src/Diagnostics/CosmosDiagnosticsContextCore.cs
Outdated
Show resolved
Hide resolved
Microsoft.Azure.Cosmos/src/Diagnostics/EmptyCosmosDiagnosticsContext.cs
Outdated
Show resolved
Hide resolved
...re.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Diagnostics/CosmosDiagnosticsSerializerTests.cs
Show resolved
Hide resolved
…pe to track overall time.
…nostics/properties
39c8c5d
to
6c98165
Compare
namespace Microsoft.Azure.Cosmos | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Contains the cosmos diagnostic information for the current request to Azure Cosmos DB service. | ||
/// </summary> | ||
public abstract class 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.
I assume this is the envelope meant to expose additional diagnostics information for customers as well that are currently only available in the opaque diagnostics string? Like ActivityIds related to the current request etc.?
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.
Yes, this is the public contract. Then we have a separate implementation class.
…ture it is easier to add GetNetworkElapsedTime or other time factors users may want.
Pull Request Template
Description
This is adding GetElapsedClientLatency to CosmosDiagnostics.
Database.ReadStreamAsync()
andDatabase.DeleteStreamAsync()
Type of change
Please delete options that are not relevant.
Closing issues
closes #1218