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 {
378
378
379
379
let mut socket_addrs = tokio:: net:: lookup_host ( host_and_port)
380
380
. 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
+ } ) ?
382
385
. collect :: < Vec < _ > > ( ) ;
386
+ tracing:: debug!( ?host_and_port, ?socket_addrs, "Resolved host" ) ;
383
387
384
388
// Remove blocked IPs
385
389
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
+
1
4
/// Initializes telemetry integration for libtest environments.
2
5
pub fn init_test_telemetry ( ) {
3
6
static ONCE : std:: sync:: Once = std:: sync:: Once :: new ( ) ;
4
7
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
+ {
6
14
eprintln ! ( "init_test_telemetry failed to init global tracing_subscriber: {err:?}" ) ;
7
15
}
8
16
} ) ;
You can’t perform that action at this time.
0 commit comments