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

Diagnostics: Adds Summary for Diagnostic message #2732

Merged
merged 15 commits into from
Sep 23, 2021

Conversation

asketagarwal
Copy link
Contributor

@asketagarwal asketagarwal commented Sep 14, 2021

This PR adds a summary of the diagnostic to the top of the message.

Sample

{
    "Direct": {
         "(200, 0)": 2,
         "(429, 0)": 1,
         "(449, 0)": 1
     },
    "RegionsContacted": 2,
    "Gateway": {
        "(200, 0)": 1,
    }
}

Perf

Benchmark tool : ReadStreamExistsWithDiagnostics
image

Direct mode read item stream with strong consistency example:

{
   "Summary": {
      "Direct": {
         "(200, 0)": 2
      },
      "RegionsContacted": 1
   },
   "name": "ReadItemStreamAsync",
   "id": "946cfd53-b6bd-4a51-8f99-ed0b94ccc6b7",
   "caller info": {
      "member": "OperationHelperWithRootTraceAsync",
      "file": "ClientContextCore.cs",
      "line": 244
   },
   "start time": "05:05:05:309",
   "duration in milliseconds": 36.0479,
   "data": {
      "Client Configuration": {
         "Client Created Time Utc": "2021-09-15T17:05:03.8531440Z",
         "NumberOfClientsCreated": 1,
         "User Agent": "cosmos-netstandard-sdk/3.21.0|3.21.1|1|X64|Microsoft Windows 10.0.19043|.NET Core 3.1.19|N|F 00000010|",
         "ConnectionConfig": {
            "gw": "(cps:50, urto:10, p:False, httpf: True)",
            "rntbd": "(cto: 5, icto: -1, mrpc: 30, mcpe: 65535, erd: True, pr: ReuseUnicastPort)",
            "other": "(ed:False, be:False)"
         },
         "ConsistencyConfig": "(consistency: NotSet, prgns:[])"
      }
   },
   "children": [
      {
         "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler",
         "id": "bf34176b-bc4e-45cd-bb07-24d7323ab5b6",
         "start time": "05:05:05:310",
         "duration in milliseconds": 35.3752,
         "children": [
            {
               "name": "Get Collection Cache",
               "id": "61f5f510-aae9-48cd-9c08-af03d1ffe53b",
               "caller info": {
                  "member": "GetCollectionCacheAsync",
                  "file": "DocumentClient.cs",
                  "line": 546
               },
               "start time": "05:05:05:310",
               "duration in milliseconds": 0.0011
            },
            {
               "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler",
               "id": "c2585599-28d9-4868-8570-f3c9e087bd36",
               "start time": "05:05:05:310",
               "duration in milliseconds": 35.2936,
               "data": {
                  "System Info": {
                     "systemHistory": [
                        {
                           "dateUtc": "2021-09-15T17:05:03.9999775Z",
                           "cpu": 10.885,
                           "memory": 6409392.000,
                           "threadInfo": {
                              "isThreadStarving": "no info",
                              "availableThreads": 32764,
                              "minThreads": 8,
                              "maxThreads": 32767
                           }
                        }
                     ]
                  }
               },
               "children": [
                  {
                     "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler",
                     "id": "89e5271b-4c63-4d26-bf84-06720d088d72",
                     "start time": "05:05:05:310",
                     "duration in milliseconds": 35.2878,
                     "children": [
                        {
                           "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler",
                           "id": "aef86a58-f59b-40c3-ba50-7d7f1f1678c0",
                           "start time": "05:05:05:310",
                           "duration in milliseconds": 35.2781,
                           "children": [
                              {
                                 "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler",
                                 "id": "d0a3e833-2090-4908-a9f1-b2646d2ac396",
                                 "start time": "05:05:05:310",
                                 "duration in milliseconds": 35.2751,
                                 "children": [
                                    {
                                       "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request",
                                       "id": "0ca31904-bdb5-40de-ad31-790293971452",
                                       "caller info": {
                                          "member": "ProcessMessageAsync",
                                          "file": "TransportHandler.cs",
                                          "line": 109
                                       },
                                       "start time": "05:05:05:310",
                                       "duration in milliseconds": 35.2348,
                                       "data": {
                                          "Client Side Request Stats": {
                                             "Id": "AggregatedClientSideRequestStatistics",
                                             "ContactedReplicas": [
                                                {
                                                   "Count": 2,
                                                   "Uri": "rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer75/partitions/a4cb4997-38c8-11e6-8106-8cdcd42c33be/replicas/1p/"
                                                }
                                             ],
                                             "RegionsContacted": [
                                                "https://127.0.0.1:8081/"
                                             ],
                                             "FailedReplicas": [],
                                             "AddressResolutionStatistics": [],
                                             "StoreResponseStatistics": [
                                                {
                                                   "ResponseTimeUTC": "2021-09-15T17:05:05.3329113Z",
                                                   "ResourceType": "Document",
                                                   "OperationType": "Read",
                                                   "LocationEndpoint": "https://127.0.0.1:8081/",
                                                   "StoreResult": {
                                                      "ActivityId": "b0a27c10-752e-46cb-8dcd-46812ac6b3ea",
                                                      "StatusCode": "Ok",
                                                      "SubStatusCode": "Unknown",
                                                      "LSN": 37,
                                                      "PartitionKeyRangeId": "0",
                                                      "GlobalCommittedLSN": -1,
                                                      "ItemLSN": 37,
                                                      "UsingLocalLSN": false,
                                                      "QuorumAckedLSN": 37,
                                                      "SessionToken": "-1#37",
                                                      "CurrentWriteQuorum": 1,
                                                      "CurrentReplicaSetSize": 1,
                                                      "NumberOfReadRegions": 0,
                                                      "IsValid": true,
                                                      "StorePhysicalAddress": "rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer75/partitions/a4cb4997-38c8-11e6-8106-8cdcd42c33be/replicas/1p/",
                                                      "RequestCharge": 1,
                                                      "BELatencyInMs": "0.501",
                                                      "transportRequestTimeline": {
                                                         "requestTimeline": [
                                                            {
                                                               "event": "Created",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3284945Z",
                                                               "durationInMs": 0.0152
                                                            },
                                                            {
                                                               "event": "ChannelAcquisitionStarted",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3285097Z",
                                                               "durationInMs": 0.5124
                                                            },
                                                            {
                                                               "event": "Pipelined",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3290221Z",
                                                               "durationInMs": 0.1351
                                                            },
                                                            {
                                                               "event": "Transit Time",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3291572Z",
                                                               "durationInMs": 0.9194
                                                            },
                                                            {
                                                               "event": "Received",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3300766Z",
                                                               "durationInMs": 1.6358
                                                            },
                                                            {
                                                               "event": "Completed",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3317124Z",
                                                               "durationInMs": 0
                                                            }
                                                         ],
                                                         "requestSizeInBytes": 472,
                                                         "responseMetadataSizeInBytes": 506,
                                                         "responseBodySizeInBytes": 671
                                                      },
                                                      "TransportException": null
                                                   }
                                                },
                                                {
                                                   "ResponseTimeUTC": "2021-09-15T17:05:05.3361517Z",
                                                   "ResourceType": "Document",
                                                   "OperationType": "Read",
                                                   "LocationEndpoint": "https://127.0.0.1:8081/",
                                                   "StoreResult": {
                                                      "ActivityId": "b0a27c10-752e-46cb-8dcd-46812ac6b3ea",
                                                      "StatusCode": "Ok",
                                                      "SubStatusCode": "Unknown",
                                                      "LSN": 37,
                                                      "PartitionKeyRangeId": "0",
                                                      "GlobalCommittedLSN": -1,
                                                      "ItemLSN": 37,
                                                      "UsingLocalLSN": false,
                                                      "QuorumAckedLSN": 37,
                                                      "SessionToken": "-1#37",
                                                      "CurrentWriteQuorum": 1,
                                                      "CurrentReplicaSetSize": 1,
                                                      "NumberOfReadRegions": 0,
                                                      "IsValid": true,
                                                      "StorePhysicalAddress": "rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer75/partitions/a4cb4997-38c8-11e6-8106-8cdcd42c33be/replicas/1p/",
                                                      "RequestCharge": 1,
                                                      "BELatencyInMs": "0.362",
                                                      "transportRequestTimeline": {
                                                         "requestTimeline": [
                                                            {
                                                               "event": "Created",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3342922Z",
                                                               "durationInMs": 0.0071
                                                            },
                                                            {
                                                               "event": "ChannelAcquisitionStarted",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3342993Z",
                                                               "durationInMs": 0.004
                                                            },
                                                            {
                                                               "event": "Pipelined",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3343033Z",
                                                               "durationInMs": 0.2102
                                                            },
                                                            {
                                                               "event": "Transit Time",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3345135Z",
                                                               "durationInMs": 0.8491
                                                            },
                                                            {
                                                               "event": "Received",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3353626Z",
                                                               "durationInMs": 0.7818
                                                            },
                                                            {
                                                               "event": "Completed",
                                                               "startTimeUtc": "2021-09-15T17:05:05.3361444Z",
                                                               "durationInMs": 0
                                                            }
                                                         ],
                                                         "requestSizeInBytes": 472,
                                                         "responseMetadataSizeInBytes": 506,
                                                         "responseBodySizeInBytes": 671
                                                      },
                                                      "TransportException": null
                                                   }
                                                }
                                             ]
                                          }
                                       }
                                    }
                                 ]
                              }
                           ]
                        }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}

Direct mode query sample with single page read:

{
   "Summary": {
      "Direct": {
         "(200, 0)": 2
      },
      "RegionsContacted": 1
   },
   "name": "FeedIterator Read Next Async",
   "id": "756be505-6d7e-488d-82b2-547b0b4e5711",
   "caller info": {
      "member": "OperationHelperWithRootTraceAsync",
      "file": "ClientContextCore.cs",
      "line": 244
   },
   "start time": "05:07:32:176",
   "duration in milliseconds": 89.6278,
   "data": {
      "Client Configuration": {
         "Client Created Time Utc": "2021-09-15T17:07:30.7343465Z",
         "NumberOfClientsCreated": 1,
         "User Agent": "cosmos-netstandard-sdk/3.21.0|3.21.1|1|X64|Microsoft Windows 10.0.19043|.NET Core 3.1.19|N|F 00000010|",
         "ConnectionConfig": {
            "gw": "(cps:50, urto:10, p:False, httpf: True)",
            "rntbd": "(cto: 5, icto: -1, mrpc: 30, mcpe: 65535, erd: True, pr: ReuseUnicastPort)",
            "other": "(ed:False, be:False)"
         },
         "ConsistencyConfig": "(consistency: NotSet, prgns:[])"
      }
   },
   "children": [
      {
         "name": "MoveNextAsync",
         "id": "2679f0ac-c24e-493c-87f7-2ce027577336",
         "caller info": {
            "member": "MoveNextAsync",
            "file": "CrossPartitionReadFeedAsyncEnumerator.cs",
            "line": 41
         },
         "start time": "05:07:32:179",
         "duration in milliseconds": 77.7681,
         "children": [
            {
               "name": "MoveNextAsync",
               "id": "88ad96fc-09e9-4901-976a-d407b111e92d",
               "caller info": {
                  "member": "MoveNextAsync",
                  "file": "CrossPartitionRangePageAsyncEnumerator.cs",
                  "line": 113
               },
               "start time": "05:07:32:183",
               "duration in milliseconds": 73.9653,
               "children": [
                  {
                     "name": "[,FF) move next",
                     "id": "47b4e09d-b3e6-4c0e-818a-80b98606ba59",
                     "caller info": {
                        "member": "MoveNextAsync",
                        "file": "PartitionRangePageAsyncEnumerator.cs",
                        "line": 49
                     },
                     "start time": "05:07:32:192",
                     "duration in milliseconds": 62.7214,
                     "children": [
                        {
                           "name": "Prefetch",
                           "id": "72139ec1-b52a-4447-b3de-b7a57fc549b2",
                           "caller info": {
                              "member": "PrefetchAsync",
                              "file": "BufferedPartitionRangePageAsyncEnumerator.cs",
                              "line": 50
                           },
                           "start time": "05:07:32:194",
                           "duration in milliseconds": 60.8302,
                           "children": [
                              {
                                 "name": "[,FF) move next",
                                 "id": "166540f0-0ea8-4677-85ad-c191141a74f8",
                                 "caller info": {
                                    "member": "MoveNextAsync",
                                    "file": "PartitionRangePageAsyncEnumerator.cs",
                                    "line": 49
                                 },
                                 "start time": "05:07:32:194",
                                 "duration in milliseconds": 60.2343,
                                 "children": [
                                    {
                                       "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler",
                                       "id": "01002ca0-5460-489f-aa82-149ec941168e",
                                       "start time": "05:07:32:195",
                                       "duration in milliseconds": 48.8021,
                                       "children": [
                                          {
                                             "name": "Get Collection Cache",
                                             "id": "d1f046c2-427a-4133-9ae4-3307bd07dce8",
                                             "caller info": {
                                                "member": "GetCollectionCacheAsync",
                                                "file": "DocumentClient.cs",
                                                "line": 546
                                             },
                                             "start time": "05:07:32:196",
                                             "duration in milliseconds": 0.0033
                                          },
                                          {
                                             "name": "Get Partition Key Range Cache",
                                             "id": "57461ab6-5cc5-4f7c-b244-a5dc7fd9f5c5",
                                             "caller info": {
                                                "member": "GetPartitionKeyRangeCacheAsync",
                                                "file": "DocumentClient.cs",
                                                "line": 555
                                             },
                                             "start time": "05:07:32:196",
                                             "duration in milliseconds": 0.0036
                                          },
                                          {
                                             "name": "Try Get Overlapping Ranges",
                                             "id": "5f35feb7-f949-4914-9543-6dbd25cfe529",
                                             "caller info": {
                                                "member": "TryGetOverlappingRangesAsync",
                                                "file": "PartitionKeyRangeCache.cs",
                                                "line": 53
                                             },
                                             "start time": "05:07:32:197",
                                             "duration in milliseconds": 3.6145
                                          },
                                          {
                                             "name": "Get Collection Cache",
                                             "id": "bf3d4299-965b-470e-bed3-f8f8e9725bf6",
                                             "caller info": {
                                                "member": "GetCollectionCacheAsync",
                                                "file": "DocumentClient.cs",
                                                "line": 546
                                             },
                                             "start time": "05:07:32:204",
                                             "duration in milliseconds": 0.0032
                                          },
                                          {
                                             "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler",
                                             "id": "31b684cd-6ca6-4928-a067-cbae71b63d7b",
                                             "start time": "05:07:32:204",
                                             "duration in milliseconds": 39.9033,
                                             "data": {
                                                "System Info": {
                                                   "systemHistory": [
                                                      {
                                                         "dateUtc": "2021-09-15T17:07:30.9517719Z",
                                                         "cpu": 10.886,
                                                         "memory": 7455204.000,
                                                         "threadInfo": {
                                                            "isThreadStarving": "no info",
                                                            "availableThreads": 32765,
                                                            "minThreads": 8,
                                                            "maxThreads": 32767
                                                         }
                                                      }
                                                   ]
                                                }
                                             },
                                             "children": [
                                                {
                                                   "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler",
                                                   "id": "ab0b0b67-a090-43cc-b290-118eb48e4c8d",
                                                   "start time": "05:07:32:204",
                                                   "duration in milliseconds": 39.8955,
                                                   "children": [
                                                      {
                                                         "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler",
                                                         "id": "f29f3f3c-79b6-413c-8d08-0b267c4ea510",
                                                         "start time": "05:07:32:204",
                                                         "duration in milliseconds": 39.8871,
                                                         "children": [
                                                            {
                                                               "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler",
                                                               "id": "c0173243-2dc4-410d-b97f-c6ed68289988",
                                                               "start time": "05:07:32:204",
                                                               "duration in milliseconds": 39.8852,
                                                               "children": [
                                                                  {
                                                                     "name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request",
                                                                     "id": "890208b0-550a-46bf-832d-9591cab7ce15",
                                                                     "caller info": {
                                                                        "member": "ProcessMessageAsync",
                                                                        "file": "TransportHandler.cs",
                                                                        "line": 109
                                                                     },
                                                                     "start time": "05:07:32:204",
                                                                     "duration in milliseconds": 39.8441,
                                                                     "data": {
                                                                        "Client Side Request Stats": {
                                                                           "Id": "AggregatedClientSideRequestStatistics",
                                                                           "ContactedReplicas": [
                                                                              {
                                                                                 "Count": 2,
                                                                                 "Uri": "rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer80/partitions/a4cb499c-38c8-11e6-8106-8cdcd42c33be/replicas/1p/"
                                                                              }
                                                                           ],
                                                                           "RegionsContacted": [
                                                                              "https://127.0.0.1:8081/"
                                                                           ],
                                                                           "FailedReplicas": [],
                                                                           "AddressResolutionStatistics": [],
                                                                           "StoreResponseStatistics": [
                                                                              {
                                                                                 "ResponseTimeUTC": "2021-09-15T17:07:32.2305044Z",
                                                                                 "ResourceType": "Document",
                                                                                 "OperationType": "ReadFeed",
                                                                                 "LocationEndpoint": "https://127.0.0.1:8081/",
                                                                                 "StoreResult": {
                                                                                    "ActivityId": "68cebe20-2b21-4624-85eb-f3d77d67afd4",
                                                                                    "StatusCode": "Ok",
                                                                                    "SubStatusCode": "Unknown",
                                                                                    "LSN": 91,
                                                                                    "PartitionKeyRangeId": "0",
                                                                                    "GlobalCommittedLSN": -1,
                                                                                    "ItemLSN": -1,
                                                                                    "UsingLocalLSN": false,
                                                                                    "QuorumAckedLSN": 91,
                                                                                    "SessionToken": "-1#91",
                                                                                    "CurrentWriteQuorum": 1,
                                                                                    "CurrentReplicaSetSize": 1,
                                                                                    "NumberOfReadRegions": 0,
                                                                                    "IsValid": true,
                                                                                    "StorePhysicalAddress": "rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer80/partitions/a4cb499c-38c8-11e6-8106-8cdcd42c33be/replicas/1p/",
                                                                                    "RequestCharge": 1,
                                                                                    "BELatencyInMs": "0.522",
                                                                                    "transportRequestTimeline": {
                                                                                       "requestTimeline": [
                                                                                          {
                                                                                             "event": "Created",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2279220Z",
                                                                                             "durationInMs": 0.0076
                                                                                          },
                                                                                          {
                                                                                             "event": "ChannelAcquisitionStarted",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2279296Z",
                                                                                             "durationInMs": 0.0062
                                                                                          },
                                                                                          {
                                                                                             "event": "Pipelined",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2279358Z",
                                                                                             "durationInMs": 0.164
                                                                                          },
                                                                                          {
                                                                                             "event": "Transit Time",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2280998Z",
                                                                                             "durationInMs": 1.0477
                                                                                          },
                                                                                          {
                                                                                             "event": "Received",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2291475Z",
                                                                                             "durationInMs": 1.06
                                                                                          },
                                                                                          {
                                                                                             "event": "Completed",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2302075Z",
                                                                                             "durationInMs": 0
                                                                                          }
                                                                                       ],
                                                                                       "requestSizeInBytes": 400,
                                                                                       "responseMetadataSizeInBytes": 477,
                                                                                       "responseBodySizeInBytes": 720
                                                                                    },
                                                                                    "TransportException": null
                                                                                 }
                                                                              },
                                                                              {
                                                                                 "ResponseTimeUTC": "2021-09-15T17:07:32.2369579Z",
                                                                                 "ResourceType": "Document",
                                                                                 "OperationType": "ReadFeed",
                                                                                 "LocationEndpoint": "https://127.0.0.1:8081/",
                                                                                 "StoreResult": {
                                                                                    "ActivityId": "68cebe20-2b21-4624-85eb-f3d77d67afd4",
                                                                                    "StatusCode": "Ok",
                                                                                    "SubStatusCode": "Unknown",
                                                                                    "LSN": 91,
                                                                                    "PartitionKeyRangeId": "0",
                                                                                    "GlobalCommittedLSN": -1,
                                                                                    "ItemLSN": -1,
                                                                                    "UsingLocalLSN": false,
                                                                                    "QuorumAckedLSN": 91,
                                                                                    "SessionToken": "-1#91",
                                                                                    "CurrentWriteQuorum": 1,
                                                                                    "CurrentReplicaSetSize": 1,
                                                                                    "NumberOfReadRegions": 0,
                                                                                    "IsValid": true,
                                                                                    "StorePhysicalAddress": "rntbd://127.0.0.1:10253/apps/DocDbApp/services/DocDbServer80/partitions/a4cb499c-38c8-11e6-8106-8cdcd42c33be/replicas/1p/",
                                                                                    "RequestCharge": 1,
                                                                                    "BELatencyInMs": "0.567",
                                                                                    "transportRequestTimeline": {
                                                                                       "requestTimeline": [
                                                                                          {
                                                                                             "event": "Created",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2333468Z",
                                                                                             "durationInMs": 0.0105
                                                                                          },
                                                                                          {
                                                                                             "event": "ChannelAcquisitionStarted",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2333573Z",
                                                                                             "durationInMs": 0.0057
                                                                                          },
                                                                                          {
                                                                                             "event": "Pipelined",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2333630Z",
                                                                                             "durationInMs": 0.1561
                                                                                          },
                                                                                          {
                                                                                             "event": "Transit Time",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2335191Z",
                                                                                             "durationInMs": 0.9698
                                                                                          },
                                                                                          {
                                                                                             "event": "Received",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2344889Z",
                                                                                             "durationInMs": 0.5768
                                                                                          },
                                                                                          {
                                                                                             "event": "Completed",
                                                                                             "startTimeUtc": "2021-09-15T17:07:32.2350657Z",
                                                                                             "durationInMs": 0
                                                                                          }
                                                                                       ],
                                                                                       "requestSizeInBytes": 400,
                                                                                       "responseMetadataSizeInBytes": 477,
                                                                                       "responseBodySizeInBytes": 720
                                                                                    },
                                                                                    "TransportException": null
                                                                                 }
                                                                              }
                                                                           ]
                                                                        }
                                                                     }
                                                                  }
                                                               ]
                                                            }
                                                         ]
                                                      }
                                                   ]
                                                }
                                             ]
                                          }
                                       ]
                                    }
                                 ]
                              }
                           ]
                        }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}

Gateway mode read item:

{
   "Summary": {
      "Gateway": {
         "(200, 0)": 1
      }
   },
   "name": "ReadItemStreamAsync",
   "id": "5f8b98e5-ebce-4f26-aad4-19f4fdf85bd5",
   "caller info": {
      "member": "OperationHelperWithRootTraceAsync",
      "file": "ClientContextCore.cs",
      "line": 244
   },
   "start time": "05:24:41:611",
   "duration in milliseconds": 76.3988,
   "data": {
      "Client Configuration": {
         "Client Created Time Utc": "2021-09-15T17:24:40.5662513Z",
         "NumberOfClientsCreated": 1,
         "User Agent": "cosmos-netstandard-sdk/3.21.0|3.21.1|1|X64|Microsoft Windows 10.0.19043|.NET Core 3.1.19|N|F 00000010|",
         "ConnectionConfig": {
            "gw": "(cps:50, urto:10, p:False, httpf: True)",
            "rntbd": "(cto: 5, icto: -1, mrpc: 30, mcpe: 65535, erd: True, pr: ReuseUnicastPort)",
            "other": "(ed:False, be:False)"
         },
         "ConsistencyConfig": "(consistency: NotSet, prgns:[])"
      }
   },
   "children": [
      {
         "name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler",
         "id": "c991f5b3-fa0e-4757-abb7-5d05d7b35062",
         "start time": "05:24:41:612",
         "duration in milliseconds": 75.7467,
         "children": [
            {
               "name": "Get Collection Cache",
               "id": "903e11c2-005c-4d1f-b9a6-e8551eaa9680",
               "caller info": {
                  "member": "GetCollectionCacheAsync",
                  "file": "DocumentClient.cs",
                  "line": 546
               },
               "start time": "05:24:41:612",
               "duration in milliseconds": 0.001
            },
            {
               "name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler",
               "id": "28430f3a-a0b9-49cd-adf9-495e65c2b6ef",
               "start time": "05:24:41:612",
               "duration in milliseconds": 75.5434,
               "data": {
                  "System Info": {
                     "systemHistory": [
                        {
                           "dateUtc": "2021-09-15T17:24:40.7176945Z",
                           "cpu": 10.888,
                           "memory": 7612916.000,
                           "threadInfo": {
                              "isThreadStarving": "no info",
                              "availableThreads": 32764,
                              "minThreads": 8,
                              "maxThreads": 32767
                           }
                        }
                     ]
                  }
               },
               "children": [
                  {
                     "name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler",
                     "id": "da9832a6-95fa-40b2-9c18-1272137017e4",
                     "start time": "05:24:41:612",
                     "duration in milliseconds": 75.5327,
                     "children": [
                        {
                           "name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler",
                           "id": "275c7220-c1be-4d87-b667-9de360087b3e",
                           "start time": "05:24:41:612",
                           "duration in milliseconds": 75.514,
                           "children": [
                              {
                                 "name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler",
                                 "id": "2ac6981d-b4e6-4cbf-b5dd-b77ca7530f9a",
                                 "start time": "05:24:41:612",
                                 "duration in milliseconds": 75.509,
                                 "children": [
                                    {
                                       "name": "Microsoft.Azure.Cosmos.GatewayStoreModel Transport Request",
                                       "id": "0a25baaa-acd9-49f1-91dd-693b0d8cf02f",
                                       "caller info": {
                                          "member": "ProcessMessageAsync",
                                          "file": "TransportHandler.cs",
                                          "line": 109
                                       },
                                       "start time": "05:24:41:612",
                                       "duration in milliseconds": 75.4674,
                                       "data": {
                                          "Client Side Request Stats": {
                                             "Id": "AggregatedClientSideRequestStatistics",
                                             "ContactedReplicas": [],
                                             "RegionsContacted": [],
                                             "FailedReplicas": [],
                                             "AddressResolutionStatistics": [],
                                             "StoreResponseStatistics": [],
                                             "HttpResponseStats": [
                                                {
                                                   "StartTimeUTC": "2021-09-15T17:24:41.6126199Z",
                                                   "DurationInMs": 72.1853,
                                                   "RequestUri": "https://127.0.0.1:8081/dbs/8d61788b-60b1-40a9-828c-729b0b2c567b/colls/6db7e320-e87d-4919-b475-944c0c3cb343/docs/76c5a3c0-f0e5-48ec-8971-e1550062d16e",
                                                   "ResourceType": "Document",
                                                   "HttpMethod": "GET",
                                                   "ActivityId": "91af05e0-6ce7-4f45-a201-0b32bc49a928",
                                                   "StatusCode": "OK"
                                                }
                                             ]
                                          },
                                          "PointOperationStatisticsTraceDatum": {
                                             "Id": "PointOperationStatistics",
                                             "ActivityId": "91af05e0-6ce7-4f45-a201-0b32bc49a928",
                                             "ResponseTimeUtc": "2021-09-15T17:24:41.6880454Z",
                                             "StatusCode": 200,
                                             "SubStatusCode": 0,
                                             "RequestCharge": 2,
                                             "RequestUri": "dbs/8d61788b-60b1-40a9-828c-729b0b2c567b/colls/6db7e320-e87d-4919-b475-944c0c3cb343/docs/76c5a3c0-f0e5-48ec-8971-e1550062d16e",
                                             "ErrorMessage": null,
                                             "RequestSessionToken": null,
                                             "ResponseSessionToken": "0:-1#61",
                                             "BELatencyInMs": "0.449"
                                          }
                                       }
                                    }
                                 ]
                              }
                           ]
                        }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}

j82w
j82w previously approved these changes Sep 14, 2021
Copy link
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

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

Please fix the double parsing

j82w
j82w previously approved these changes Sep 15, 2021
ealsur
ealsur previously approved these changes Sep 15, 2021
@asketagarwal asketagarwal dismissed stale reviews from ealsur and j82w via 90da6e0 September 21, 2021 10:59
@j82w j82w merged commit a154351 into master Sep 23, 2021
@j82w j82w deleted the users/askagarw/summaryDiagnosticsImproved branch September 23, 2021 11:50
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.

None yet

4 participants