Commit 5355fc46 authored by pengys5's avatar pengys5
Browse files

Span web Ui test success.

#351
parent 883ee2f7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import java.util.List;
import org.skywalking.apm.collector.storage.dao.DAOContainer;
import org.skywalking.apm.collector.ui.cache.ServiceNameCache;
import org.skywalking.apm.collector.ui.dao.ISegmentDAO;
import org.skywalking.apm.network.proto.KeyWithStringValue;
import org.skywalking.apm.network.proto.LogMessage;
@@ -23,7 +24,11 @@ public class SpanService {
        List<SpanObject> spans = segmentObject.getSpansList();
        for (SpanObject spanObject : spans) {
            if (spanId == spanObject.getSpanId()) {
                spanJson.addProperty("operationName", spanObject.getOperationName());
                String operationName = spanObject.getOperationName();
                if (spanObject.getOperationNameId() != 0) {
                    operationName = ServiceNameCache.get(spanObject.getOperationNameId());
                }
                spanJson.addProperty("operationName", operationName);
                spanJson.addProperty("startTime", spanObject.getStartTime());
                spanJson.addProperty("endTime", spanObject.getEndTime());