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

Internal ITrace: Adds UserAgent #2213

Merged
merged 1 commit into from
Feb 12, 2021
Merged

Conversation

bchong95
Copy link
Contributor

@bchong95 bchong95 commented Feb 12, 2021

Internal ITrace: Adds UserAgent

Description

Adds the user agent to the trace datum for network requests.

Current trace string looks like this:

.
└── CreateItemStreamAsync(6e383ac9-8568-4ab6-8aa4-8315034d4850)  Transport-Component  08:06:34:437  10.79 milliseconds  
    └── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(a1b4d817-8daa-408f-9c84-e73975b15d66)  RequestHandler-Component  08:06:34:438  9.37 milliseconds  
        └── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(4ec9e1d8-e690-477d-bda8-2f67ccf14e5f)  RequestHandler-Component  08:06:34:438  9.33 milliseconds  
            └── Send Async(10007cbe-2e9d-48fa-a530-ea96f824c51c)  RequestHandler-Component  08:06:34:438  9.28 milliseconds  
                │   (
                │       [CPU Load History]
                │       (2021-02-12T20:06:31.0931288Z 100.000)
                │   )
                └── Send Async(3e62d468-06f1-453c-99dd-2e8aa938558b)  RequestHandler-Component  08:06:34:438  9.26 milliseconds  
                    └── Send Async(c2760143-b879-4383-b790-81f3ee9b80b6)  RequestHandler-Component  08:06:34:438  9.25 milliseconds  
                        └── Send Async(bd5d3f66-a93f-4122-ad11-d86f62790f73)  RequestHandler-Component  08:06:34:438  9.21 milliseconds  
                            └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(99f9204f-ca2e-4c2b-9d9c-4c4605f5962c)  Transport-Component  08:06:34:438  9.12 milliseconds  
                                    (
                                        [User Agent]
                                        cosmos-netstandard-sdk/3.16.0|3.17.1|01|X64|Microsoft Windows 10.0.19042 |.NET Core 4.6.29719.03|
                                        [Client Side Request Stats]
                                        Start Time: 2021-02-12T20:06:34.4384253Z
                                        End Time: 2021-02-12T20:06:34.4474739Z
                                        Contacted Replicas
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/: 12
                                        Failed to Contact Replicas
                                        Regions Contacted
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                          rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                        Address Resolution Statistics
                                        ┌──────────────────────┬──────────────────────┬────────────────────────────────────┐
                                        │Start Time (utc)      │End Time (utc)        │Endpoint                            │
                                        ├──────────────────────┼──────────────────────┼────────────────────────────────────┤
                                        └──────────────────────┴──────────────────────┴────────────────────────────────────┘
                                        Store Response Statistics
                                          Start Time: 2021-02-12T20:06:34.4402813Z
                                          End Time: 2021-02-12T20:06:34.4474739Z
                                          Resource Type: Document
                                          Operation Type: Create
                                          Store Result
                                            Activity Id: 55cf6893-6062-4f26-9a96-4baa7ee5bc8c
                                            Store Physical Address: rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer6/partitions/a4cb4952-38c8-11e6-8106-8cdcd42c33be/replicas/1p/
                                            Status Code: Created/Unknown
                                            Is Valid: True
                                            LSN Info
                                              LSN: 25
                                              Item LSN: -1
                                              Global LSN: -1
                                              Quorum Acked LSN: 24
                                              Using LSN: False
                                            Session Token: -1#25
                                            Quorum Info
                                              Current Replica Set Size: 1
                                              Current Write Quorum: 1
                                            Is Client CPU Overloaded: False
                                            Exception
                                    )

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.

🕐

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:

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