File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -216,13 +216,16 @@ impl PolicyServer {
216
216
. route ( "/audit/:policy_id" , post ( audit_handler) )
217
217
. route ( "/validate/:policy_id" , post ( validate_handler) )
218
218
. route ( "/validate_raw/:policy_id" , post ( validate_raw_handler) )
219
- . route ( "/readiness" , get ( readiness_handler) )
220
219
. with_state ( state. clone ( ) )
221
220
. layer (
222
221
TraceLayer :: new_for_http ( )
223
222
. make_span_with ( trace:: DefaultMakeSpan :: new ( ) . level ( Level :: INFO ) )
224
223
. on_response ( trace:: DefaultOnResponse :: new ( ) . level ( Level :: INFO ) ) ,
225
- ) ;
224
+ )
225
+ // Adding the readiness probe handler after the tracing layer to avoid logging
226
+ // See: https://github.com/tokio-rs/axum/discussions/355
227
+ . route ( "/readiness" , get ( readiness_handler) ) ;
228
+
226
229
if config. enable_pprof {
227
230
activate_memory_profiling ( ) . await ?;
228
231
You can’t perform that action at this time.
0 commit comments