@@ -48,7 +48,6 @@ public final class ContinuableScopeManager implements AgentScopeManager {
48
48
final boolean strictMode ;
49
49
private final ScopeStackThreadLocal tlsScopeStack ;
50
50
private final int depthLimit ;
51
- private final boolean inheritAsyncPropagation ;
52
51
final HealthMetrics healthMetrics ;
53
52
private final ProfilingContextIntegration profilingContextIntegration ;
54
53
@@ -57,36 +56,24 @@ public final class ContinuableScopeManager implements AgentScopeManager {
57
56
*
58
57
* @param depthLimit The maximum scope depth limit, <code>0</code> for unlimited.
59
58
* @param strictMode Whether check if the closed spans are the active ones or not.
60
- * @param inheritAsyncPropagation Whether the next span should inherit the active span
61
- * asyncPropagation flag.
62
59
*/
63
- public ContinuableScopeManager (
64
- final int depthLimit , final boolean strictMode , final boolean inheritAsyncPropagation ) {
65
- this (
66
- depthLimit ,
67
- strictMode ,
68
- inheritAsyncPropagation ,
69
- ProfilingContextIntegration .NoOp .INSTANCE ,
70
- HealthMetrics .NO_OP );
60
+ public ContinuableScopeManager (final int depthLimit , final boolean strictMode ) {
61
+ this (depthLimit , strictMode , ProfilingContextIntegration .NoOp .INSTANCE , HealthMetrics .NO_OP );
71
62
}
72
63
73
64
/**
74
65
* Default constructor.
75
66
*
76
67
* @param depthLimit The maximum scope depth limit, <code>0</code> for unlimited.
77
68
* @param strictMode Whether check if the closed spans are the active ones or not.
78
- * @param inheritAsyncPropagation Whether the next span should inherit the active span
79
- * asyncPropagation flag.
80
69
*/
81
70
public ContinuableScopeManager (
82
71
final int depthLimit ,
83
72
final boolean strictMode ,
84
- final boolean inheritAsyncPropagation ,
85
73
final ProfilingContextIntegration profilingContextIntegration ,
86
74
final HealthMetrics healthMetrics ) {
87
75
this .depthLimit = depthLimit == 0 ? Integer .MAX_VALUE : depthLimit ;
88
76
this .strictMode = strictMode ;
89
- this .inheritAsyncPropagation = inheritAsyncPropagation ;
90
77
this .scopeListeners = new CopyOnWriteArrayList <>();
91
78
this .extendedScopeListeners = new CopyOnWriteArrayList <>();
92
79
this .healthMetrics = healthMetrics ;
@@ -141,9 +128,7 @@ private AgentScope activate(
141
128
boolean asyncPropagation =
142
129
overrideAsyncPropagation
143
130
? isAsyncPropagating
144
- : inheritAsyncPropagation && top != null
145
- ? top .isAsyncPropagating ()
146
- : DEFAULT_ASYNC_PROPAGATING ;
131
+ : top != null ? top .isAsyncPropagating () : DEFAULT_ASYNC_PROPAGATING ;
147
132
148
133
final ContinuableScope scope =
149
134
new ContinuableScope (this , span , source , asyncPropagation , createScopeState (span ));
@@ -219,10 +204,7 @@ public AgentScope activateNext(final AgentSpan span) {
219
204
220
205
final ContinuableScope top = scopeStack .top ;
221
206
222
- boolean asyncPropagation =
223
- inheritAsyncPropagation && top != null
224
- ? top .isAsyncPropagating ()
225
- : DEFAULT_ASYNC_PROPAGATING ;
207
+ boolean asyncPropagation = top != null ? top .isAsyncPropagating () : DEFAULT_ASYNC_PROPAGATING ;
226
208
227
209
final ContinuableScope scope =
228
210
new ContinuableScope (
0 commit comments