Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Add simple registerIfAbsent to global tracer #289

Merged
merged 6 commits into from
Oct 31, 2018

Conversation

pavolloffay
Copy link
Member

Resolves #286

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

* @see #registerIfAbsent(Callable) for
*/
public static synchronized boolean registerIfAbsent(final Tracer tracer) {
requireNonNull(tracer, "Cannot register GlobalTracer from provider <null>.");
Copy link
Contributor

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>

@coveralls
Copy link

coveralls commented Jul 13, 2018

Coverage Status

Coverage increased (+0.1%) to 76.632% when pulling 8cd1dff on pavolloffay:globaltracer-register into 9b6ca36 on opentracing:v0.32.0.

@pavolloffay
Copy link
Member Author

cc @opentracing/opentracing-java-maintainers

jpkrohling and others added 4 commits September 25, 2018 11:04
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>
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay
Copy link
Member Author

@sjoerdtalsma I have added a commit fixing your comment and also fixing other javadoc (referencing deprecated method)

@pavolloffay pavolloffay mentioned this pull request Oct 31, 2018
@pavolloffay pavolloffay changed the base branch from master to v0.32.0 October 31, 2018 12:52
@pavolloffay
Copy link
Member Author

I have changed the target branch to v0.32.0

@carlosalberto
Copy link
Collaborator

@sjoerdtalsma Is this good to go? If yes, please merge it so this can be included in RC1 ;)

@sjoerdtalsma
Copy link
Contributor

I still don't understand the following javadoc:

Use {@link #registerIfAbsent(Callable)} for use cases when the tracer can be instantiated multiple times.

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.
I don't want to block for a javadoc comment, but I get more questions than answers when reading this.

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

LGTM, 🚢 it

@carlosalberto carlosalberto merged commit 013dafb into opentracing:v0.32.0 Oct 31, 2018
@carlosalberto
Copy link
Collaborator

Awesome! Will be including this change in RC1 ;)

carlosalberto added a commit that referenced this pull request Mar 25, 2019
* 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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants