-
Notifications
You must be signed in to change notification settings - Fork 345
Add simple registerIfAbsent to global tracer #289
Add simple registerIfAbsent to global tracer #289
Conversation
* @see #registerIfAbsent(Callable) for | ||
*/ | ||
public static synchronized boolean registerIfAbsent(final Tracer tracer) { | ||
requireNonNull(tracer, "Cannot register GlobalTracer from provider <null>."); |
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.
Cannot register GlobalTracer from provider <null>
-->
Cannot register global tracer <null>
cc @opentracing/opentracing-java-maintainers |
opentracing-util/src/main/java/io/opentracing/util/GlobalTracer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
df71957
to
d936304
Compare
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@sjoerdtalsma I have added a commit fixing your comment and also fixing other javadoc (referencing deprecated method) |
I have changed the target branch to |
@sjoerdtalsma Is this good to go? If yes, please merge it so this can be included in RC1 ;) |
opentracing-util/src/main/java/io/opentracing/util/GlobalTracer.java
Outdated
Show resolved
Hide resolved
I still don't understand the following javadoc:
Where does GlobalTracer say anything about instantiating multiple times? The callable use case is for guaranteed 'at most once' initialization. You may also call it Lazy initialization. |
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
LGTM, 🚢 it |
Awesome! Will be including this change in RC1 ;) |
* Deprecate the StringTag.set() overload taking a StringTag. (#262) * Implement Trace Identifiers. (#280) * Bump JaCoCo to use a Java 10 friendly version (#306) * Remove finish span on close (#301) * Deprecate finishSpanOnClose on activation. * Add ScopeManager.activeSpan() and Tracer.activateSpan(). * Clarify the API changes and deprecations. * Add an error reporting sample to opentracing-testbed. * Simple layer on top of ByteBuffer for BINARY format. (#276) * Add generic typed setTag/withTag (#311) * Allow injecting into maps of type Map<String,Object> (#310) * Add simple registerIfAbsent to global tracer (#289) * Split Inject and Extract Builtin interfaces (#316) * Deprecate ScopeManager.active() (#326) * Make Tracer extends Closable. (#329) * Do not make isRegistered() synchronized. (#333) * Deprecate AutoFinishScopeManager (#335)
Resolves #286
Signed-off-by: Pavol Loffay ploffay@redhat.com