Merge pull request #286 from ascrutae/zhangxin/feature/local-span-transform

fix issue that local span transform failured
This commit is contained in:
吴晟 Wu Sheng 2017-07-12 03:50:29 -05:00 committed by GitHub
commit 64435c3e39
2 changed files with 6 additions and 8 deletions

View File

@ -232,11 +232,15 @@ public abstract class AbstractTracingSpan implements AbstractSpan {
} else {
spanBuilder.setSpanType(SpanType.Local);
}
spanBuilder.setSpanLayerValue(this.layer.getCode());
if (this.layer != null) {
spanBuilder.setSpanLayerValue(this.layer.getCode());
}
if (componentId != DictionaryUtil.nullValue()) {
spanBuilder.setComponentId(componentId);
} else {
spanBuilder.setComponent(componentName);
if (componentName != null) {
spanBuilder.setComponent(componentName);
}
}
spanBuilder.setIsError(errorOccurred);
if (this.tags != null) {

View File

@ -1,7 +1,5 @@
package org.skywalking.apm.agent.core.context.trace;
import org.skywalking.apm.network.proto.SpanObject;
/**
* The <code>LocalSpan</code> represents a normal tracing point, such as a local method.
*
@ -29,10 +27,6 @@ public class LocalSpan extends AbstractTracingSpan {
return this;
}
@Override public SpanObject.Builder transform() {
return null;
}
@Override public boolean isEntry() {
return false;
}