Closed sjoerdtalsma closed 6 years ago
Callable sgtm
@pavolloffay Have your comments been addressed?
@pavolloffay @yurishkuro Are there any remaining concerns regarding this PR?
Otherwise it may be a good idea to merge this soon, to allow people to adapt to the deprecation as soon as possible.
lgtm, 🚢
The last activity on this PR is almost a month ago with three approvals given already. @pavolloffay do you have any remaining concerns regarding this PR?
Otherwise I suggest we merge this soon, so people can get used to the deprecated method and its replacement.
@sjoerdtalsma sorry for long delay, thanks for the PR!
I think we could/should still keep GlobalTracer.register(tracer)
or registerIfAbsent(Tracer)
for simpler use cases. Integrations in runtimes usually controls tracer initialization.
@sjoerdtalsma do you want to tackle it in this PR? If not let's merge this and do it separately.
I am also a bit concerned about callable. Maybe a separate interface would be better. Callable somehow indicates use of executors which is not the case here.
@pavolloffay
I think we could/should still keep GlobalTracer.register(tracer) or registerIfAbsent(Tracer) for simpler use cases. Integrations in runtimes usually controls tracer initialization.
I'm not sure I understand what you mean here. registerIfAbsent
is a replacement of register
. Do you know of a use-case for register
that isn't possible with registerIfAbsent
? It is entirely possible that I misunderstood your comment.
I am also a bit concerned about callable. Maybe a separate interface would be better. Callable somehow indicates use of executors which is not the case here.
My ideal would be to use a Supplier<Tracer>
but that doesn't exist in our java version yet.
I actually started with a separate TracerSupplier
interface. Then you asked whether it was necessary. Discussion and agreement amounted to just using Callable
and wrap the checked exceptions as the most simple solution and not worthy of a separate interface just for this purpose.
I'm not against re-introducing the separate interface again, but maybe we're running in circles on this one?
Maybe someone should just merge this in and if there are many questions re: Callable, replace it by TracerSupplier at that time?
@sjoerdtalsma I mean we should also keep simple registerIfAbsent(Tracer tracer)
without callable. Usually, runtimes control tracer initialization so there is no need for callable!
This can go in registerIfAbsent(Tracer tracer)
can be added in a separate PR
@pavolloffay
This can go in
registerIfAbsent(Tracer tracer)
can be added in a separate PR
It may be good to discuss the Tracer
variant in a separate PR indeed, re: @yurishkuro's comment here: https://github.com/opentracing/opentracing-java/pull/269#discussion_r181815569
Thanks everyone for their review, could someone with merge rights merge this then? :wink:
@sjoerdtalsma think does not work for me, I will merge this now
As discussed in #186 replace
void register(Tracer)
with a more atomicboolean registerIfAbsent(Tracer)
method.