Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce opentracing ScopeManager implementation based on our context #110

Merged
merged 1 commit into from
Mar 13, 2019

Conversation

sjoerdtalsma
Copy link
Contributor

Implementation of ScopeManager based on our own AbstractThreadLocalContext class with the following advantages over the 'standard' opentracing-util ThreadLocalScopeManager:

  1. Close is explicitly idempotent; closing more than once has no additional side-effects
    (even when finishOnClose is set to true).
  2. More predictable behaviour for out-of-order closing of scopes.
    Although this is explicitly unsupported by the opentracing specification,
    we think having consistent and predictable behaviour is an advantage.
  3. Support for {@link nl.talsmasoftware.context.observer.ContextObserver}.
    See ThreadLocalScopeManager should be extensible opentracing/opentracing-java#334 why this is an advantage.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 96.089% when pulling ae5dd28 on ot-contextscopemanager into f4177c6 on develop.

@sjoerdtalsma sjoerdtalsma merged commit e481471 into develop Mar 13, 2019
@sjoerdtalsma sjoerdtalsma deleted the ot-contextscopemanager branch March 13, 2019 08:40
sjoerdtalsma added a commit that referenced this pull request May 6, 2019
Implementation of ScopeManager based on our own AbstractThreadLocalContext class with the following advantages over the 'standard' opentracing-util ThreadLocalScopeManager:

1. Close is explicitly idempotent; closing more than once has no additional side-effects
(even when finishOnClose is set to true).
2. More predictable behaviour for out-of-order closing of scopes.
Although this is explicitly unsupported by the opentracing specification,
we think having consistent and predictable behaviour is an advantage.
3. Support for {@link nl.talsmasoftware.context.observer.ContextObserver}.
See opentracing/opentracing-java#334 why this is an advantage.

Signed-off-by: Sjoerd Talsma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants