Skip to content

Commit

Permalink
#3439 - Handle removal of ClientResponse#rawStatusCode and bump to Sp…
Browse files Browse the repository at this point in the history
…ring Boot 3.2
  • Loading branch information
Nicklas Wallgren committed Nov 24, 2023
1 parent fd60ac8 commit bfcc8ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void onNext(T t) {
try {
if (span != null && t instanceof ClientResponse) {
ClientResponse clientResponse = (ClientResponse) t;
int statusCode = clientResponse.rawStatusCode();
int statusCode = clientResponse.statusCode().value();
span.withOutcome(ResultUtil.getOutcomeByHttpClientStatus(statusCode));
span.getContext().getHttp().withStatusCode(statusCode);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private WebClient.ResponseSpec request(String method, Function<UriBuilder, URI>
.headers(httpHeaders -> httpHeaders.addAll(headers))
.cookies(httpCookies -> httpCookies.addAll(cookies))
.retrieve()
.onRawStatus(status -> status != expectedStatus, r -> Mono.error(new IllegalStateException(String.format("unexpected response status %d", r.rawStatusCode()))));
.onRawStatus(status -> status != expectedStatus, r -> Mono.error(new IllegalStateException(String.format("unexpected response status %d", r.statusCode().value()))));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion apm-agent-plugins/apm-spring-webflux/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<!-- spring boot version to use for dependency management & testing -->
<version.spring-boot-2>2.7.16</version.spring-boot-2>
<version.spring-boot-3>3.1.5</version.spring-boot-3>
<version.spring-boot-3>3.2.0</version.spring-boot-3>
</properties>

<modules>
Expand Down

0 comments on commit bfcc8ee

Please sign in to comment.