mirror of https://github.com/grpc/grpc-node.git
Add HTTP/2 settings frame tracing.
This adds HTTP/2 settings frame information to debug logs. HTTP/2 settings frame contains important information like max_concurrent_streams and initial_window_size useful for debugging concurrency, latency, and throughput issues.
This commit is contained in:
parent
2334ca9dfa
commit
ae2a2ac7d0
|
@ -555,6 +555,24 @@ export class Subchannel {
|
||||||
(error as Error).message
|
(error as Error).message
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
if (logging.isTracerEnabled(TRACER_NAME)) {
|
||||||
|
session.on('remoteSettings', (settings: http2.Settings) => {
|
||||||
|
this.trace(
|
||||||
|
'new settings received' +
|
||||||
|
(this.session !== session ? ' on the old connection' : '') +
|
||||||
|
': ' +
|
||||||
|
JSON.stringify(settings)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
session.on('localSettings', (settings: http2.Settings) => {
|
||||||
|
this.trace(
|
||||||
|
'local settings acknowledged by remote' +
|
||||||
|
(this.session !== session ? ' on the old connection' : '') +
|
||||||
|
': ' +
|
||||||
|
JSON.stringify(settings)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private startConnectingInternal() {
|
private startConnectingInternal() {
|
||||||
|
|
Loading…
Reference in New Issue