Skip to content
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

2.10.2.Final, ContextualData lost in rest-client-reactive response #26857

Closed
lthasle opened this issue Jul 21, 2022 · 14 comments
Closed

2.10.2.Final, ContextualData lost in rest-client-reactive response #26857

lthasle opened this issue Jul 21, 2022 · 14 comments
Labels
area/rest-client kind/bug Something isn't working

Comments

@lthasle
Copy link

lthasle commented Jul 21, 2022

Describe the bug

ContextualData lost in the rest client reactive(vert.x-eventloop) response

https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/2.2E10.2E2.2EFinal.2C.20ContextualData.20lost.20in.20rest-client-reactive.20re

Expected behavior

ContextualData should be availiable in the response

Actual behavior

ContextualData is lost

How to Reproduce?

See provided reproducer

run provided test & verify the log in MyClientResponseFilter

It works for 2.10.1.Final, ie. ContextualData is not lost

Output of uname -a or ver

uname -a Linux hty80028.sb1a.sparebank1.no 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 8 13:30:15 EST 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.10.2.Final & 2.11.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

rest-client-reactive-quickstart11.zip

@lthasle lthasle added the kind/bug Something isn't working label Jul 21, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 21, 2022

/cc @michalszynkiewicz

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 21, 2022

You added a link to a Zulip discussion, please make sure the description of the issue is comprehensive and doesn't require accessing Zulip.

This message is automatically generated by a bot.

@gsmet
Copy link
Member

gsmet commented Jul 21, 2022

/cc @Sgitario

@RuggeroDAlo
Copy link
Contributor

@lthasle Probably the same issue as #26717 ? I think it is caused by #26332

@lthasle
Copy link
Author

lthasle commented Aug 18, 2022

Any progress on this?
I tried with the latest Quarkus version: 2.11.2.Final and found that it is still not fixed

@gsmet
Copy link
Member

gsmet commented Aug 18, 2022

@cescoffier I had a look at the reproducer and it turns out ContextualData is io.reactiverse.contextual.logging.ContextualData. Wondering if it's something we support and if we have a similar feature if not.

@cescoffier
Copy link
Member

@gsmet not really, we have some support of it in https://github.com/quarkusio/quarkus/blob/main/extensions/vertx/latebound-mdc-provider/src/main/java/io/quarkus/vertx/mdc/provider/LateBoundMDCProvider.java.

ContextualData is data associated with the Vert.x duplicated context.

@lthasle
Copy link
Author

lthasle commented Aug 18, 2022

Hi!

As it is working in previous Quarkus versions (up to 2.10.1.Final)
I expect it also to work in later versions?
Migration-Guides, don't include any information about this breaking change.

@cescoffier was helpful and provided us with this solution when we migrated to reactive some time ago.

Any advice on this issue is much appreciated, as we need to be on the latest Quarkus version, due to other solved issues in latest version.

The sollution is according to this:
https://reactiverse.io/reactiverse-contextual-logging/

@cescoffier
Copy link
Member

I believe it's a context propgation related bug. We are working on this from different angle and hope to provide a fix (like #27443) soon.

There are two issues:

  • there is a duplication of the duplicated context due to OpenTelemetry
  • the context is lost when resteasy reactive suspend the request (and the context is not re-activated)

@lthasle
Copy link
Author

lthasle commented Sep 14, 2022

@cescoffier
Any news on this?
Will it be fixed in: #27443

@cescoffier
Copy link
Member

Ah yes! Sorry! It should be fixed in the release that should go out today (CR1).

Basically, as you saw the contextual data was lost. It's not the case anymore.

It would be great if you could verify, and let us know.

@cescoffier
Copy link
Member

Ok due to Sonatype being picky (ask @gsmet), it may be only released tomorrow.

@RuggeroDAlo
Copy link
Contributor

@cescoffier I just did a quick test with 2.13.0.CR1 and the issue using MDC seems to be fixed (I opened duplicate issue #26717 ), thanks!

@lthasle
Copy link
Author

lthasle commented Sep 15, 2022

@cescoffier Works fine, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest-client kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants