@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2023 the original author or authors .
* Copyright 2002 - 2024 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -137,4 +137,16 @@ class DefaultServerRequestObservationConventionTests {
@@ -137,4 +137,16 @@ class DefaultServerRequestObservationConventionTests {
. contains ( KeyValue . of ( "http.url" , "/test" ) ) ;
}
@Test
void addsKeyValuesForInvalidStatusExchange ( ) {
this . request . setRequestURI ( "/test/invalidStatus" ) ;
this . response . setStatus ( 0 ) ;
assertThat ( this . convention . getLowCardinalityKeyValues ( this . context ) ) . hasSize ( 5 )
. contains ( KeyValue . of ( "method" , "GET" ) , KeyValue . of ( "uri" , "UNKNOWN" ) , KeyValue . of ( "status" , "0" ) ,
KeyValue . of ( "exception" , "none" ) , KeyValue . of ( "outcome" , "UNKNOWN" ) ) ;
assertThat ( this . convention . getHighCardinalityKeyValues ( this . context ) ) . hasSize ( 1 )
. contains ( KeyValue . of ( "http.url" , "/test/invalidStatus" ) ) ;
}
}