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

Deprecate AutoFinishScopeManager #335

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@

import java.util.concurrent.atomic.AtomicInteger;

/**
* {@link AutoFinishScope} is a {@link Scope} implementation that uses ref-counting
* to automatically finish the wrapped {@link Span}.
*
* @see AutoFinishScopeManager
*/
@Deprecated
public class AutoFinishScope implements Scope {
final AutoFinishScopeManager manager;
final AtomicInteger refCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;)

* A {@link ScopeManager} implementation that uses ref-counting to automatically finish {@link Span}s.
*
* @see AutoFinishScope
*/
@Deprecated
public class AutoFinishScopeManager implements ScopeManager {
final ThreadLocal<AutoFinishScope> tlsScope = new ThreadLocal<AutoFinishScope>();

Expand Down