File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ export interface ChannelOptions {
57
57
'grpc-node.max_session_memory' ?: number ;
58
58
'grpc.service_config_disable_resolution' ?: number ;
59
59
'grpc.client_idle_timeout_ms' ?: number ;
60
+ /**
61
+ * Set the enableTrace option in TLS clients and servers
62
+ */
63
+ 'grpc-node.tls_enable_trace' ?: number ;
60
64
// eslint-disable-next-line @typescript-eslint/no-explicit-any
61
65
[ key : string ] : any ;
62
66
}
@@ -91,6 +95,7 @@ export const recognizedOptions = {
91
95
'grpc-node.max_session_memory' : true ,
92
96
'grpc.service_config_disable_resolution' : true ,
93
97
'grpc.client_idle_timeout_ms' : true ,
98
+ 'grpc-node.tls_enable_trace' : true ,
94
99
} ;
95
100
96
101
export function channelOptionsEqual (
Original file line number Diff line number Diff line change @@ -427,6 +427,8 @@ export class Server {
427
427
serverOptions ,
428
428
creds . _getSettings ( ) !
429
429
) ;
430
+ secureServerOptions . enableTrace =
431
+ this . options [ 'grpc-node.tls_enable_trace' ] === 1 ;
430
432
http2Server = http2 . createSecureServer ( secureServerOptions ) ;
431
433
http2Server . on ( 'secureConnection' , ( socket : TLSSocket ) => {
432
434
/* These errors need to be handled by the user of Http2SecureServer,
Original file line number Diff line number Diff line change @@ -677,6 +677,7 @@ export class Http2SubchannelConnector implements SubchannelConnector {
677
677
connectionOptions = {
678
678
...connectionOptions ,
679
679
...address ,
680
+ enableTrace : options [ 'grpc-node.tls_enable_trace' ] === 1 ,
680
681
} ;
681
682
682
683
/* http2.connect uses the options here:
@@ -760,6 +761,9 @@ export class Http2SubchannelConnector implements SubchannelConnector {
760
761
connectionOptions . servername = hostPort ?. host ?? targetPath ;
761
762
}
762
763
}
764
+ if ( options [ 'grpc-node.tls_enable_trace' ] ) {
765
+ connectionOptions . enableTrace = true ;
766
+ }
763
767
}
764
768
765
769
return getProxiedConnection ( address , options , connectionOptions ) . then (
You can’t perform that action at this time.
0 commit comments