mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2041 from nimf/http2-flowctrl-tracing
HTTP/2 flow control tracing
This commit is contained in:
commit
d57df93200
|
@ -37,6 +37,7 @@ can be set.
|
|||
- `server_call` - Traces server handling of individual requests
|
||||
- `subchannel` - Traces subchannel connectivity state and errors
|
||||
- `subchannel_refcount` - Traces subchannel refcount changes
|
||||
- `subchannel_flowctrl` - Traces HTTP/2 flow control
|
||||
|
||||
The following tracers are added by the `@grpc/grpc-js-xds` library:
|
||||
- `cds_balancer` - Traces the CDS load balancing policy
|
||||
|
|
|
@ -41,6 +41,7 @@ import { SubchannelRef, ChannelzTrace, ChannelzChildrenTracker, SubchannelInfo,
|
|||
const clientVersion = require('../../package.json').version;
|
||||
|
||||
const TRACER_NAME = 'subchannel';
|
||||
const FLOW_CONTROL_TRACER_NAME = 'subchannel_flowctrl';
|
||||
|
||||
const MIN_CONNECT_TIMEOUT_MS = 20000;
|
||||
const INITIAL_BACKOFF_MS = 1000;
|
||||
|
@ -324,6 +325,10 @@ export class Subchannel {
|
|||
logging.trace(LogVerbosity.DEBUG, 'subchannel_refcount', '(' + this.channelzRef.id + ') ' + this.subchannelAddressString + ' ' + text);
|
||||
}
|
||||
|
||||
private flowControlTrace(text: string): void {
|
||||
logging.trace(LogVerbosity.DEBUG, FLOW_CONTROL_TRACER_NAME, '(' + this.channelzRef.id + ') ' + this.subchannelAddressString + ' ' + text);
|
||||
}
|
||||
|
||||
private handleBackoffTimer() {
|
||||
if (this.continueConnecting) {
|
||||
this.transitionToState(
|
||||
|
@ -848,6 +853,12 @@ export class Subchannel {
|
|||
' with headers\n' +
|
||||
headersString
|
||||
);
|
||||
this.flowControlTrace(
|
||||
'local window size: ' +
|
||||
this.session!.state.localWindowSize +
|
||||
' remote window size: ' +
|
||||
this.session!.state.remoteWindowSize
|
||||
);
|
||||
const streamSession = this.session;
|
||||
let statsTracker: SubchannelCallStatsTracker;
|
||||
if (this.channelzEnabled) {
|
||||
|
|
Loading…
Reference in New Issue