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

TCK doesn't use returned instrumented ClientBuilder #157

Open
pdudits opened this issue Sep 20, 2019 · 6 comments · May be fixed by #158
Open

TCK doesn't use returned instrumented ClientBuilder #157

pdudits opened this issue Sep 20, 2019 · 6 comments · May be fixed by #158

Comments

@pdudits
Copy link

pdudits commented Sep 20, 2019

TestClientRegistrarWebServices doesn't use the client returned from ClientTracingRegistrar as instrumented client.

The javadoc of ClientTracingRegistrar says "returns a ClientBuilder with enabled tracing integration.", therefore the test should not expect original builder to be fully instrumented.

pdudits added a commit to pdudits/microprofile-opentracing that referenced this issue Sep 20, 2019
pdudits added a commit to pdudits/microprofile-opentracing that referenced this issue Sep 20, 2019
@kenfinnigan
Copy link
Member

Why not clarify the javadoc then, as the implementation clearly operates on the builder passed into the method?

@pavolloffay
Copy link
Contributor

+1 we should fix the javadoc. The intention was to configure the builder and also return the same instance to allow chaining builder calls.

@pdudits
Copy link
Author

pdudits commented Sep 24, 2019

The reason I opt for actually using the result is, that not all context propagation can be done my means of JAX-RS api, and I had to resort to decoration of the builder and client to capture context of rx() calls, which might not use the provided execution factory.

@kenfinnigan
Copy link
Member

Any propagation that's required beyond that of the JAX-RS APIs, should be handled by MP Context Propagation.

My preference would still be for updating the javadoc only

@pavolloffay
Copy link
Contributor

The reason I opt for actually using the result is, that not all context propagation can be done my means of JAX-RS api, and I had to resort to decoration of the builder and client to capture context of rx()

Could you please paste here a code sample? And also what implementation are you using? The ClientTracingRegistrar is there to install filters and instrument the executor service to propagate the context.

@pdudits
Copy link
Author

pdudits commented Sep 25, 2019

I am implementing Jersey-based tracing for Payara. We used decoration for capturing calling (main) thread context for async calls at builder level, but recently decided to minimize its impact. Therefore we moved the decoration into ClientTracingRegistrar.

ExecutorService wrapping works for async calls, but IMO there's no guarantee of executor service being used when using Invocation.Builder#rx(), or that submission would happen on main thread. That's why being able to decorate in this method looks desirable to me.

But in parallel we'll be working towards direct support for context propagation within Jersey, that would work without any wrapping.

jGauravGupta pushed a commit to payara/patched-src-microprofile-opentracing that referenced this issue Dec 7, 2020
MattGill98 pushed a commit to payara/patched-src-microprofile-opentracing that referenced this issue Feb 1, 2021
arieki pushed a commit to arieki/patched-src-microprofile-opentracing that referenced this issue Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants