Fix profile trace not match when change the entry operationId/Name (#4528)
* Fix profile trace not match when change the entry operationId/Name * Update TracingContext.java Co-authored-by: Mrproliu <mrproliu@lagou.com> Co-authored-by: 吴晟 Wu Sheng <wu.sheng@foxmail.com>
This commit is contained in:
parent
dcd66ee6e9
commit
c8187ccd41
|
|
@ -353,6 +353,11 @@ public class TracingContext implements AbstractTracerContext {
|
|||
final AbstractSpan parentSpan = peek();
|
||||
final int parentSpanId = parentSpan == null ? -1 : parentSpan.getSpanId();
|
||||
if (parentSpan != null && parentSpan.isEntry()) {
|
||||
/**
|
||||
* Only add the profiling recheck on creating entry span,
|
||||
* as the operation name could be overrided.
|
||||
*/
|
||||
profilingRecheck(parentSpan, operationName);
|
||||
entrySpan = (AbstractTracingSpan) DictionaryManager.findEndpointSection()
|
||||
.findOnly(segment.getServiceId(), operationName)
|
||||
.doInCondition(
|
||||
|
|
|
|||
|
|
@ -212,9 +212,6 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
|
|||
public AbstractTracingSpan setOperationName(String operationName) {
|
||||
this.operationName = operationName;
|
||||
this.operationId = DictionaryUtil.nullValue();
|
||||
|
||||
// recheck profiling status
|
||||
owner.profilingRecheck(this, operationName);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue