Updates to lates Brave (#1736)
Notably, this fixes a missing localEndpoint.ip field
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<spring-boot.version>2.3.3.RELEASE</spring-boot.version>
|
||||
<brave.version>5.12.3</brave.version>
|
||||
<brave.version>5.12.6</brave.version>
|
||||
<okhttp.version>3.14.6</okhttp.version>
|
||||
</properties>
|
||||
|
||||
|
||||
2
pom.xml
2
pom.xml
@@ -257,7 +257,7 @@
|
||||
<spring-cloud-stream.version>Horsham.SR8</spring-cloud-stream.version>
|
||||
<spring-cloud-netflix.version>2.2.6.BUILD-SNAPSHOT</spring-cloud-netflix.version>
|
||||
<spring-cloud-openfeign.version>2.2.6.BUILD-SNAPSHOT</spring-cloud-openfeign.version>
|
||||
<brave.version>5.12.3</brave.version>
|
||||
<brave.version>5.12.6</brave.version>
|
||||
<spring-security-boot-autoconfigure.version>2.1.7.RELEASE</spring-security-boot-autoconfigure.version>
|
||||
<spring-cloud-aws.version>2.2.5.BUILD-SNAPSHOT</spring-cloud-aws.version>
|
||||
<disable.nohttp.checks>false</disable.nohttp.checks>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<name>spring-cloud-sleuth-dependencies</name>
|
||||
<description>Spring Cloud Sleuth Dependencies</description>
|
||||
<properties>
|
||||
<brave.version>5.12.3</brave.version>
|
||||
<brave.version>5.12.6</brave.version>
|
||||
<brave.opentracing.version>0.37.2</brave.opentracing.version>
|
||||
<grpc.spring.boot.version>3.4.1</grpc.spring.boot.version>
|
||||
</properties>
|
||||
|
||||
@@ -93,6 +93,12 @@ abstract class ITSpringConfiguredReactorClient
|
||||
getMono(context, pathIncludingQuery).block();
|
||||
}
|
||||
|
||||
@Override
|
||||
final protected void options(AnnotationConfigApplicationContext context,
|
||||
String path) {
|
||||
optionsMono(context, path).block();
|
||||
}
|
||||
|
||||
@Override
|
||||
final protected void post(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery, String body) {
|
||||
@@ -105,14 +111,20 @@ abstract class ITSpringConfiguredReactorClient
|
||||
TestHttpCallbackSubscriber.subscribe(getMono(context, path), callback);
|
||||
}
|
||||
|
||||
/** Returns a {@link Mono} of the HTTP status code from the given "POST" request. */
|
||||
abstract Mono<Integer> postMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery, String body);
|
||||
|
||||
/** Returns a {@link Mono} of the HTTP status code. */
|
||||
abstract Mono<Integer> getMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery);
|
||||
|
||||
/**
|
||||
* Returns a {@link Mono} of the HTTP status code from the given "OPTIONS" request.
|
||||
*/
|
||||
abstract Mono<Integer> optionsMono(AnnotationConfigApplicationContext context,
|
||||
String path);
|
||||
|
||||
/** Returns a {@link Mono} of the HTTP status code from the given "POST" request. */
|
||||
abstract Mono<Integer> postMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery, String body);
|
||||
|
||||
/**
|
||||
* This assumes that implementations do not issue an HTTP request until
|
||||
* {@link Subscription#request(long)} is called. Since a client span is only for
|
||||
|
||||
@@ -70,6 +70,19 @@ public class ReactorNettyHttpClientBraveTests extends ITSpringConfiguredReactorC
|
||||
super(HttpClientBeanPostProcessor.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> getMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery) {
|
||||
return context.getBean(HttpClient.class).get().uri(pathIncludingQuery).response()
|
||||
.map(r -> r.status().code());
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> optionsMono(AnnotationConfigApplicationContext context, String path) {
|
||||
return context.getBean(HttpClient.class).options().uri(path).response()
|
||||
.map(r -> r.status().code());
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> postMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery, String body) {
|
||||
@@ -78,11 +91,4 @@ public class ReactorNettyHttpClientBraveTests extends ITSpringConfiguredReactorC
|
||||
.response().map(r -> r.status().code());
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> getMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery) {
|
||||
return context.getBean(HttpClient.class).get().uri(pathIncludingQuery).response()
|
||||
.map(r -> r.status().code());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,6 +52,19 @@ public class WebClientBraveTests extends ITSpringConfiguredReactorClient {
|
||||
TraceWebClientBeanPostProcessor.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> getMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery) {
|
||||
return context.getBean(WebClient.Builder.class).build().get()
|
||||
.uri(pathIncludingQuery).exchange().map(ClientResponse::rawStatusCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> optionsMono(AnnotationConfigApplicationContext context, String path) {
|
||||
return context.getBean(WebClient.Builder.class).build().options().uri(path)
|
||||
.exchange().map(ClientResponse::rawStatusCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> postMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery, String body) {
|
||||
@@ -60,13 +73,6 @@ public class WebClientBraveTests extends ITSpringConfiguredReactorClient {
|
||||
.map(ClientResponse::rawStatusCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
Mono<Integer> getMono(AnnotationConfigApplicationContext context,
|
||||
String pathIncludingQuery) {
|
||||
return context.getBean(WebClient.Builder.class).build().get()
|
||||
.uri(pathIncludingQuery).exchange().map(ClientResponse::rawStatusCode);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("WebClient is blind to the implementation of redirects")
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user