Support set operation name in async mode span (#4015)
This commit is contained in:
parent
cfb3379cd0
commit
31a6407feb
|
|
@ -96,7 +96,7 @@ public class EntrySpan extends StackBasedTracingSpan {
|
|||
|
||||
@Override
|
||||
public AbstractTracingSpan setOperationName(String operationName) {
|
||||
if (stackDepth == currentMaxDepth) {
|
||||
if (stackDepth == currentMaxDepth || isInAsyncMode) {
|
||||
return super.setOperationName(operationName);
|
||||
} else {
|
||||
return this;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public class ExitSpan extends StackBasedTracingSpan implements WithPeerInfo {
|
|||
|
||||
@Override
|
||||
public AbstractTracingSpan setOperationName(String operationName) {
|
||||
if (stackDepth == 1) {
|
||||
if (stackDepth == 1 || isInAsyncMode) {
|
||||
return super.setOperationName(operationName);
|
||||
} else {
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Reference in New Issue