File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -378,8 +378,12 @@ impl ConnectOptions {
378378
379379 let mut socket_addrs = tokio:: net:: lookup_host ( host_and_port)
380380 . await
381- . map_err ( |_| dns_error ( "address not available" . into ( ) , 0 ) ) ?
381+ . map_err ( |err| {
382+ tracing:: debug!( ?host_and_port, ?err, "Error resolving host" ) ;
383+ dns_error ( "address not available" . into ( ) , 0 )
384+ } ) ?
382385 . collect :: < Vec < _ > > ( ) ;
386+ tracing:: debug!( ?host_and_port, ?socket_addrs, "Resolved host" ) ;
383387
384388 // Remove blocked IPs
385389 let blocked_addrs = self . blocked_networks . remove_blocked ( & mut socket_addrs) ;
Original file line number Diff line number Diff line change 1+ use tracing:: level_filters:: LevelFilter ;
2+ use tracing_subscriber:: fmt:: format:: FmtSpan ;
3+
14/// Initializes telemetry integration for libtest environments.
25pub fn init_test_telemetry ( ) {
36 static ONCE : std:: sync:: Once = std:: sync:: Once :: new ( ) ;
47 ONCE . call_once ( || {
5- if let Err ( err) = tracing_subscriber:: fmt ( ) . with_test_writer ( ) . try_init ( ) {
8+ if let Err ( err) = tracing_subscriber:: fmt ( )
9+ . with_max_level ( LevelFilter :: DEBUG )
10+ . with_span_events ( FmtSpan :: CLOSE )
11+ . with_test_writer ( )
12+ . try_init ( )
13+ {
614 eprintln ! ( "init_test_telemetry failed to init global tracing_subscriber: {err:?}" ) ;
715 }
816 } ) ;
You can’t perform that action at this time.
0 commit comments