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

Instrument mp-rest-client #102

Merged
merged 10 commits into from Jan 9, 2019

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented Sep 14, 2018

Resolves #82

The current proposed solution:
All clients are by default traced. Tracing could be disabled via Traced(false) on the client interface or method.

Issues to address:

SmallRye implementation smallrye/smallrye-opentracing#28

Other links to blocking issues, mostly for testing (SmallRye):

@pavolloffay
Copy link
Member Author

hi @andymc12 could you please look at the linked issues for mp-rest-client?

eclipse/microprofile-rest-client#122
eclipse/microprofile-rest-client#121

Alternative to these two could be a listener similar to onNewBuilder. But it would be beforeClientCreated(builder, interfaceClass).

@pavolloffay pavolloffay changed the title WIP: Instrument mp-rest-client Instrument mp-rest-client Jan 8, 2019
@pavolloffay
Copy link
Member Author

pavolloffay commented Jan 8, 2019

@fmhwong @objectiser could you please review?

The PR should be in a final form. Once this is merged we could split TCK and locate rest client tests in a separate module for vendors who do not implement rest-client, this however requires creating a shared tck package for some common classes and services e.g. tracer service.

I was able to successfully pass TCK with smallrye implementation, the PR to smallrye is linked in the first comment of this PR.

Copy link

@objectiser objectiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor comments.

spec/src/main/asciidoc/microprofile-opentracing.asciidoc Outdated Show resolved Hide resolved
*/
@Test
@RunAsClient
private void testNestedSpans() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like missing the async version of this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test testMultithreadedNestedSpansAsync should test it.

Copy link
Contributor

@fmhwong fmhwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (just some minor comments)

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay pavolloffay merged commit 75d222d into eclipse:master Jan 9, 2019
@fachat
Copy link

fachat commented Mar 11, 2019

In 19.0.0.2 the RestClientBuilder is still not automatically instrumented with opentracing, so the called service does not get the span id, thus cannot be correlated in e.g. zipkin.
Is there a target date for this? Is there a mitigation, because mp RestClient is so much more convenient to program.
Edit: openliberty 19.0.0.2, eclipse microprofile 2.1

@kenfinnigan
Copy link
Contributor

@fachat that's a question for OpenLiberty vs the specification (as I believe that's what the version you mention refers to).

It is most definitely resolved in the specification, but it's likely OpenLiberty doesn't implement that version yet

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 this pull request may close these issues.

None yet

5 participants