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

Deprecate AutoFinishScopeManager #335

Conversation

carlosalberto
Copy link
Collaborator

The last fix before releasing 0.32 ;)

@yurishkuro

@coveralls
Copy link

coveralls commented Mar 13, 2019

Coverage Status

Coverage remained the same at 77.301% when pulling 9ccbc1c on carlosalberto:deprecate_autofinishscopemanager into e2f9280 on opentracing:v0.32.0.

Copy link
Contributor

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

I am in favour of deprecating this, but please explain the reason a bit more.
@yurishkuro ?

@@ -18,6 +18,13 @@

import java.util.concurrent.atomic.AtomicInteger;

/**
* @deprecated use {@link ThreadLocalScopeManager} instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this explain you you can still 'automatically' finish spans when scope is closed?
Or do we not want that anymore?

i.e. Please describe the reason for deprecating this functionality

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added a (very) small note. Let me know if you think we need further clarification/details ;)

@yurishkuro
Copy link
Member

The operating mode this classes proposes is in contrast with the main philosophy of 0.32 where we deprecated autoFinish flag in activate (), because it too easily leads to programming mistakes of using try-with-resource on the scope and not having the right span to handle errors.

I think we should stick with one recommended instrumentation pattern, shown in 0.32 readme, instead of having the instrumentation be dependent on which scope manager is in use.

@carlosalberto
Copy link
Collaborator Author

Also, the historical context is that we wanted to preserve this for people migrating from 0.30.

That being said, I will add this and @yurishkuro 's note and then merge.

/**
* @deprecated use {@link ThreadLocalScope} instead.
* The operation mode of this class contrasts with the 0.32
* deprecation of auto finishing {@link Span}s upon {@link Scope#close()}.
Copy link
Member

Choose a reason for hiding this comment

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

Could also add a link to this issue for more background.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great idea!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done ;)

@carlosalberto
Copy link
Collaborator Author

Hey hey guys - if you are ok with this, I will merge later today, and issue the 0.32 release right after ;)

Let me know.

@carlosalberto carlosalberto merged commit 1fb24fd into opentracing:v0.32.0 Mar 15, 2019
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

5 participants