Bhs/scopes update#2
Open
carlosalberto wants to merge 20 commits intobhs:bhs/scopesfrom
Open
Conversation
…callbacks Add an example for multiple callbacks for an active span.
'Only' put 3 levels of callbacks, to not make it too hard to read.
…llbacks Add an example of nested callbacks.
…eplacement Add an example for an active span being temporary replaced.
…_finish Add a late-finish Span example.
malafeev
reviewed
Aug 22, 2017
| private final AutoFinishScope.Continuation continuation; | ||
|
|
||
| Callback(Scope activeSpan) { | ||
| continuation = ((AutoFinishScope)activeSpan).defer(); |
There was a problem hiding this comment.
casting doesn't look nice. What if it's not AutoFinishScope?
Collaborator
Author
There was a problem hiding this comment.
Hey!
So, if you are talking about the chance of Scope not being a AutoFinishScope here, I can add the check for sanity purposes (even though we know that for this example, we always get an Auto one :) )
But if you are talking about doing such cast overall - that's a reason to try to include the defer and Continuation api into the main interface (i.e. io.opentracing.Scope)
There was a problem hiding this comment.
yeah, my concern about generic use case
e7a67e6 to
f3dded7
Compare
f3dded7 to
f62b2e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the latest examples to the Scope prototype.
Observe it can't be merged automatically (I had to manually fix the merge from contrib/master into this branch ;) ) For your consideration, and wondering if I should put this branch in the opentracing-contrib repo itself (not in master, of course ;) )