@@ -1479,12 +1479,16 @@ pub async fn run(
1479
1479
#[ cfg( feature = "google" ) ]
1480
1480
{
1481
1481
tracing:: info!( "Built with `google` feature" ) ;
1482
- let env_predict_route = std:: env:: var ( "AIP_PREDICT_ROUTE" )
1483
- . context ( "`AIP_PREDICT_ROUTE` env var must be set for Google Vertex deployments" ) ?;
1484
- app = app. route ( & env_predict_route, post ( vertex_compatibility) ) ;
1485
- let env_health_route = std:: env:: var ( "AIP_HEALTH_ROUTE" )
1486
- . context ( "`AIP_HEALTH_ROUTE` env var must be set for Google Vertex deployments" ) ?;
1487
- app = app. route ( & env_health_route, get ( health) ) ;
1482
+
1483
+ if let Ok ( env_predict_route) = std:: env:: var ( "AIP_PREDICT_ROUTE" ) {
1484
+ tracing:: info!( "Serving Vertex compatible route on {env_predict_route}" ) ;
1485
+ app = app. route ( & env_predict_route, post ( vertex_compatibility) ) ;
1486
+ }
1487
+
1488
+ if let Ok ( env_health_route) = std:: env:: var ( "AIP_HEALTH_ROUTE" ) {
1489
+ tracing:: info!( "Serving Vertex compatible health route on {env_health_route}" ) ;
1490
+ app = app. route ( & env_health_route, get ( health) ) ;
1491
+ }
1488
1492
}
1489
1493
#[ cfg( not( feature = "google" ) ) ]
1490
1494
{
@@ -1546,6 +1550,9 @@ pub async fn run(
1546
1550
// Run server
1547
1551
let listener = tokio:: net:: TcpListener :: bind ( & addr) . await . unwrap ( ) ;
1548
1552
1553
+ tracing:: info!( "Starting HTTP server: {}" , & addr) ;
1554
+ tracing:: info!( "Ready" ) ;
1555
+
1549
1556
axum:: serve ( listener, app)
1550
1557
// Wait until all requests are finished to shut down
1551
1558
. with_graceful_shutdown ( shutdown:: shutdown_signal ( ) )
0 commit comments