Skip to content

[Internal] Thin Client Integration: Adds diagnostic log info for thinclient mode.#5263

Closed
aavasthy wants to merge 5 commits intomasterfrom
users/aavasthy/thinclientDiagnostics
Closed

[Internal] Thin Client Integration: Adds diagnostic log info for thinclient mode.#5263
aavasthy wants to merge 5 commits intomasterfrom
users/aavasthy/thinclientDiagnostics

Conversation

@aavasthy
Copy link
Copy Markdown
Contributor

@aavasthy aavasthy commented Jun 28, 2025

Pull Request Template

Description

  • Updated the Diagnostics Summary to contain the proxy interactions:

     "Summary": {
         "GatewayCalls": {
             "(200, 0)": 1,
             "(304, 0)": 1
         },
         "GatewayV2Calls": {
             "(200, 0)": 1
         }
    
  • Added a new feature in the UserAgentFeatureFlags the following, so that the diagnostics user agent can contain the
    thin client enablement flag:

    • A new Feature Flag for Thin Client.
    • A new Feature Flag for Binary Encoding.
     	internal enum UserAgentFeatureFlags
     	{
     		 PerPartitionAutomaticFailover = 1,
    
                         PerPartitionCircuitBreaker = 2,
    
                         ThinClient = 4,
    
                         BinaryEncoding = 8,
     	}	
    

    An updated user agent can look like the following: "User Agent": "cosmos-netstandard-sdk/3.51.0|1|X64|Microsoft Windows 10.0.26100|.NET 6.0.36|L|F4|" if only thinclient is enabled.

image
  • New feature (non-breaking change which adds functionality)

Closing issues

To automatically close an issue: closes #4615


if (this.ThinclientRequestsSummary.IsValueCreated)
{
jsonWriter.WriteFieldName("ThinclientCalls");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Change it to ProxyCalls ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let's keep thinclient across, thinclient is the mode name and summary has details about different mode names.

Comment thread Microsoft.Azure.Cosmos/src/Diagnostics/UserAgentFeatureFlags.cs Outdated
PerPartitionCircuitBreaker = 2,
PerPartitionCircuitBreaker = 2,

ThinClient = 3,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ThinClient in diagnostic naming feels not right. At=least syntactically ThinProxy might be right mapping.
Might be even better to have an abstract notion (like GWV2 etc...) thoughts?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes - ThinProxy sounds better.

@kundadebdatta
Copy link
Copy Markdown
Member

Closing this PR as the follow up PR PR-5265 has been merged with only the user agent feature changes.

We can re-open this PR in the future if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Thin Client Integration] Analyze and Implement Changes in Cosmos Diagnostics

3 participants