-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use new reactor contextWrite when available (from reactor 3.4.0) #7538
Conversation
@@ -56,6 +67,7 @@ public List<String> requestHeader(ClientRequest request, String name) { | |||
} | |||
|
|||
@Override | |||
@Nullable | |||
public Integer statusCode( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I encountered the same issue in #7551 -- and decided not to use the rawStatusCode()
method, it's already deprecated and a target for removal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept rawStatusCode()
for version range [5.1,6.0)
, but added new path for 6.0
interim = | ||
(Mono<String>) | ||
MONO_CONTEXT_WRITE_METHOD.invoke( | ||
interim, new StoreOpenTelemetryContext(Context.current().with(span))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the previous version of this code, wasn't Context.current().with(span)
executed as a part of the lambda? I mean it was lazy before, now it's eager
That's the part where I gave up when I was trying to update the instrumentation 🙈 |
I accidentally added in #7538
Related to #7107 and #7202
Support WebFlux 6.
Supporting reactor 3.5 seems pretty straightforward, the
subscriberContext()
was deprecated in 3.4 in favor ofcontextWrite()
. In 3.5,subscriberContext()
was removed.This PR doesn't bump
latestDepTestLibrary
to 3.5 yet because there are a couple of tests that succeed in 3.4 usingcontextWrite()
but fail in 3.5 usingcontextWrite()
.My proposal is to review/merge this PR, and then I can ping our resident reactor experts to see if they have thoughts on the failing tests in 3.5.