Skip to content

Conversation

@pavolloffay
Copy link
Collaborator

Signed-off-by: Pavol Loffay ploffay@redhat.com

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay pavolloffay requested a review from objectiser April 24, 2019 13:40
@pavolloffay
Copy link
Collaborator Author

Once merged I will release it as 0.3.0

Copy link
Contributor

@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.

LGTM - just the one issue.

new TracedRunnable(runnable, tracer));
Span toActivate = span != null ? span : tracer.activeSpan();
return delegate.submit(toActivate == null ? runnable :
new TracedRunnable(runnable, tracer), toActivate);
Copy link
Contributor

Choose a reason for hiding this comment

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

The toActivate should be in the TracedRunnable parameters I believe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch!

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Copy link
Collaborator

@sjoerdtalsma sjoerdtalsma left a comment

Choose a reason for hiding this comment

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

Aside from the naming comment, functionally this looks good!

}

Scope createScope(String operationName) {
Span createSpan(String operationName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: The method name does not indicate that there may not be a span created (which in cases with active spans would actually be the norm).

The name should make it feel natural that null gets returned and in which situations. Something like createNewSpanWhenNoActiveSpanExists() may be a bit too verbose, but I hope you get my point.
This rename may be a good time to think of a better name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks @sjoerdtalsma I will leave it as it was. The method also takes into account an internal parameter whether to create a span or not.

@pavolloffay pavolloffay merged commit db55e33 into opentracing-contrib:master Apr 25, 2019
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.

3 participants