-
Notifications
You must be signed in to change notification settings - Fork 21
Create new span if parent span is missing and traceWithActiveSpanOnly = false #13
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
Create new span if parent span is missing and traceWithActiveSpanOnly = false #13
Conversation
…raceWithActiveSpanOnly = false Signed-off-by: Sergei Malafeev <sergeymalafeev@gmail.com>
sjoerdtalsma
left a comment
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 see a lot of repetition of:
Scope scope = null;
if (tracer.activeSpan() == null && !traceWithActiveSpanOnly) {
scope = tracer.buildSpan(operationName).startActive(true);
}Could you extract that part into a separate method? I think it would make the code cleaner.
Signed-off-by: Sergei Malafeev <sergeymalafeev@gmail.com>
|
@sjoerdtalsma done |
|
@sjoerdtalsma , @pavolloffay does it looks fine? |
jpkrohling
left a comment
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.
LGTM. Perhaps a method could have a better name, but it looks OK in general.
src/main/java/io/opentracing/contrib/concurrent/TracedScheduledExecutorService.java
Show resolved
Hide resolved
src/test/java/io/opentracing/contrib/concurrent/TracedExecutorServiceTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sergei Malafeev <sergeymalafeev@gmail.com>
Signed-off-by: Sergei Malafeev <sergeymalafeev@gmail.com>
sjoerdtalsma
left a comment
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.
Looks good to me
Signed-off-by: Sergei Malafeev <sergeymalafeev@gmail.com>
|
thanks guys. |
|
Sure I will cut a new one |
fix for #6
we need it for SpecialAgent
@pavolloffay please review