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 @@ -426,6 +426,8 @@ export class Server {
426
426
serverOptions ,
427
427
creds . _getSettings ( ) !
428
428
) ;
429
+ secureServerOptions . enableTrace =
430
+ this . options [ 'grpc-node.tls_enable_trace' ] === 1 ;
429
431
http2Server = http2 . createSecureServer ( secureServerOptions ) ;
430
432
http2Server . on ( 'secureConnection' , ( socket : TLSSocket ) => {
431
433
/* These errors need to be handled by the user of Http2SecureServer,
Original file line number Diff line number Diff line change @@ -712,6 +712,7 @@ export class Http2SubchannelConnector implements SubchannelConnector {
712
712
connectionOptions = {
713
713
...connectionOptions ,
714
714
...address ,
715
+ enableTrace : options [ 'grpc-node.tls_enable_trace' ] === 1 ,
715
716
} ;
716
717
717
718
/* http2.connect uses the options here:
@@ -795,6 +796,9 @@ export class Http2SubchannelConnector implements SubchannelConnector {
795
796
connectionOptions . servername = hostPort ?. host ?? targetPath ;
796
797
}
797
798
}
799
+ if ( options [ 'grpc-node.tls_enable_trace' ] ) {
800
+ connectionOptions . enableTrace = true ;
801
+ }
798
802
}
799
803
800
804
return getProxiedConnection ( address , options , connectionOptions ) . then (
You can’t perform that action at this time.
0 commit comments