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

rntbd: capture request/response length in the request diagnostics #15579

Conversation

moderakh
Copy link
Contributor

@moderakh moderakh commented Sep 24, 2020

This PR adds RNTBD request length and response length to the request diagnostics. This helps in troubleshooting cases where the latency is high (e.g., rntbd transit time is high).

The following section added to request diagnostics:

"rntbdRequestLengthInBytes": 415,
"rntbdResponseLengthInBytes": 768,
"requestPayloadLengthInBytes": 0,
"responsePayloadLengthInBytes": 303

rntbdRequestLengthInBytes represents the full rntbd request length including headers and payload
requestPayloadLengthInBytes represents the request payload size only.
similarly rntbdResponseLengthInBytes and responsePayloadLengthInBytes are defined.

full diagnostics:

{
	"userAgent": "azsdk-java-cosmos/4.6.0-beta.1 MacOSX/10.15.6 JRE/11.0.6",
	"requestLatencyInMs": 2,
	"requestStartTimeUTC": "2020-09-24T06:38:01.049335Z",
	"requestEndTimeUTC": "2020-09-24T06:38:01.052043Z",
	"connectionMode": "DIRECT",
	"responseStatisticsList": [{
		"storeResult": {
			"storePhysicalAddress": "rntbd://10.37.129.3:10253/apps/DocDbApp/services/DocDbServer10/partitions/a4cb4956-38c8-11e6-8106-8cdcd42c33be/replicas/1p/",
			"lsn": 1720,
			"globalCommittedLsn": -1,
			"partitionKeyRangeId": "0",
			"isValid": true,
			"statusCode": 200,
			"subStatusCode": 0,
			"isGone": false,
			"isNotFound": false,
			"isInvalidPartition": false,
			"requestCharge": 1.0,
			"itemLSN": 1720,
			"sessionToken": "-1#1720",
			"exception": null,
			"transportRequestTimeline": [{
				"eventName": "created",
				"durationInMicroSec": "19",
				"startTime": "2020-09-24T06:38:01.050130Z"
			}, {
				"eventName": "queued",
				"durationInMicroSec": "193",
				"startTime": "2020-09-24T06:38:01.050149Z"
			}, {
				"eventName": "pipelined",
				"durationInMicroSec": "470",
				"startTime": "2020-09-24T06:38:01.050342Z"
			}, {
				"eventName": "transitTime",
				"durationInMicroSec": "1027",
				"startTime": "2020-09-24T06:38:01.050812Z"
			}, {
				"eventName": "received",
				"durationInMicroSec": "135",
				"startTime": "2020-09-24T06:38:01.051839Z"
			}, {
				"eventName": "completed",
				"durationInMicroSec": "1",
				"startTime": "2020-09-24T06:38:01.051974Z"
			}],
			"rntbdRequestLengthInBytes": 414,
			"rntbdResponseLengthInBytes": 769,
			"requestPayloadLengthInBytes": 0,
			"responsePayloadLengthInBytes": 303
		},
		"requestResponseTimeUTC": "2020-09-24T06:38:01.052043Z",
		"requestResourceType": "Document",
		"requestOperationType": "Read"
	}],
	"supplementalResponseStatisticsList": [],
	"addressResolutionStatistics": {},
	"regionsContacted": ["https://10.37.129.3:8081/"],
	"retryContext": {
		"retryCount": 0,
		"statusAndSubStatusCodes": null,
		"retryLatency": 0
	},
	"metadataDiagnosticsContext": {
		"metadataDiagnosticList": null
	},
	"serializationDiagnosticsContext": {
		"serializationDiagnosticsList": null
	},
	"gatewayStatistics": null,
	"systemInformation": {
		"usedMemory": "77966 KB",
		"availableMemory": "16699250 KB",
		"systemCpuLoad": "empty"
	}
}

Copy link
Member

@kushagraThapar kushagraThapar left a comment

Choose a reason for hiding this comment

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

LGTM

@moderakh
Copy link
Contributor Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moderakh moderakh merged commit bf4e502 into Azure:master Sep 24, 2020
@moderakh moderakh deleted the users/moderakh/rntbd-request-response-len-statistics branch November 19, 2020 00:04
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-java that referenced this pull request Sep 9, 2021
Merge Dev-containerservice-microsoft.containerservice-2021-08-01 branch to main (Azure#15954)

* Adds base for updating Microsoft.ContainerService from version stable/2021-07-01 to version 2021-08-01

* Updates readme

* Updates API version in new specs and examples

* add publicNetworkAccess property per network platform's request (Azure#15489)

* add publicNetworkAccess per network platform's request

* fix quota

Co-authored-by: Li Ma <[email protected]>

* update readme for 2021-08-01 sdk generation (Azure#15476)

* update readme for sdk generation

* update readme for sdk generation

Co-authored-by: Charlie Li <[email protected]>

* allow disabling of runcommand (Azure#15481)

* allow disabling of runcommand

* rename file

* another rename

* fix prittier check

* fix stupid prettier check

* change publicNetworkAccess to enum (Azure#15564)

Co-authored-by: Li Ma <[email protected]>

* Add CreationData property to Agentpool level in 2021-08-01 API (Azure#15563)

* Add CreationData property to Agentpool level in 2021-08-01 API

* fix json format

* fix swagger spell check

Co-authored-by: Charlie Li <[email protected]>

* chore: add enableMultipleStandardLoadBalancers to loadBalancerProfile (Azure#15579)

* Add snapshot related new APIs and properties to AKS 2021-08-01 swagger (Azure#15586)

* Add CreationData property to Agentpool level in 2021-08-01 API

* Add snapshot related APIs and properties to AKS 2021-08-01 swagger

* fix lint and spell checks

* fix lint and spell checks

* fix PrettierCheck

* Change some Nodepool to NodePool

* some changes according to ARM team's review comments

Co-authored-by: Charlie Li <[email protected]>

* fix tag typo to match tag convention (Azure#15683)

* add workload runtime to agent pool api (Azure#15726)

* add workload runtime to agent pool api

* reference example

* add custom words

* fix: workload runtime description (Azure#15782)

* fix: workload runtime description

* add wasmtime to custom words

* clarify single workload type per node

Co-authored-by: Matthew Christopher <[email protected]>

Co-authored-by: Matthew Christopher <[email protected]>

* fix typo in readme.python.md (Azure#15903)

* Add CreationData property to Agentpool level in 2021-08-01 API

* fix typos in readme.python.md

Co-authored-by: Charlie Li <[email protected]>

* merge recent custom-words.txt changes from main branch to resolve conflicts (Azure#15938)

* Add CreationData property to Agentpool level in 2021-08-01 API

* merge recent custom-words.txt changes from main branch to resolve conflicts

Co-authored-by: Charlie Li <[email protected]>

* pull custom-words.txt from main

* add a new word - NodePool

* add two more words

Co-authored-by: Super <[email protected]>
Co-authored-by: Li Ma <[email protected]>
Co-authored-by: Charlie Li <[email protected]>
Co-authored-by: Haitao Chen <[email protected]>
Co-authored-by: Qi Ni <[email protected]>
Co-authored-by: Ariel Silverman <[email protected]>
Co-authored-by: Ace Eldeib <[email protected]>
Co-authored-by: Matthew Christopher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants