未验证 提交 cbc69290 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

HTTP doc error about SpanLayer. (#4464)

上级 74b0af9d
...@@ -128,7 +128,7 @@ Input: ...@@ -128,7 +128,7 @@ Input:
"parentSpanId": 0, "parentSpanId": 0,
"componentId": 6000, "componentId": 6000,
"peer": "User Service Name-nginx:upstream_ip:port", "peer": "User Service Name-nginx:upstream_ip:port",
"spanLayer": "HTTP" "spanLayer": "Http"
}, },
{ {
"operationName": "/tier2/lb", "operationName": "/tier2/lb",
...@@ -170,7 +170,7 @@ Input: ...@@ -170,7 +170,7 @@ Input:
"entryEndpoint": "/ingress" "entryEndpoint": "/ingress"
} }
], ],
"spanLayer": "HTTP" "spanLayer": "Http"
} }
], ],
"serviceInstanceId": 1, "serviceInstanceId": 1,
......
...@@ -21,6 +21,7 @@ package org.apache.skywalking.oap.server.receiver.trace.provider.parser.listener ...@@ -21,6 +21,7 @@ package org.apache.skywalking.oap.server.receiver.trace.provider.parser.listener
import java.io.IOException; import java.io.IOException;
import org.apache.skywalking.apm.network.common.Command; import org.apache.skywalking.apm.network.common.Command;
import org.apache.skywalking.apm.network.common.Commands; import org.apache.skywalking.apm.network.common.Commands;
import org.apache.skywalking.apm.network.language.agent.SpanLayer;
import org.apache.skywalking.apm.network.language.agent.UpstreamSegment; import org.apache.skywalking.apm.network.language.agent.UpstreamSegment;
import org.apache.skywalking.apm.network.language.agent.v2.SegmentObject; import org.apache.skywalking.apm.network.language.agent.v2.SegmentObject;
import org.apache.skywalking.oap.server.library.util.ProtoBufJsonUtils; import org.apache.skywalking.oap.server.library.util.ProtoBufJsonUtils;
...@@ -42,7 +43,7 @@ public class ProtoBufJsonUtilsTest { ...@@ -42,7 +43,7 @@ public class ProtoBufJsonUtilsTest {
" \"parentSpanId\": 0,\n" + " \"parentSpanId\": 0,\n" +
" \"componentId\": 6000,\n" + " \"componentId\": 6000,\n" +
" \"peer\": \"User Service Name-nginx:upstream_ip:port\",\n" + " \"peer\": \"User Service Name-nginx:upstream_ip:port\",\n" +
" \"spanLayer\": \"HTTP\"\n" + " \"spanLayer\": \"Http\"\n" +
" },\n" + " },\n" +
" {\n" + " {\n" +
" \"operationName\": \"/tier2/lb\",\n" + " \"operationName\": \"/tier2/lb\",\n" +
...@@ -83,7 +84,7 @@ public class ProtoBufJsonUtilsTest { ...@@ -83,7 +84,7 @@ public class ProtoBufJsonUtilsTest {
" \"entryEndpoint\": \"/ingress\"\n" + " \"entryEndpoint\": \"/ingress\"\n" +
" }\n" + " }\n" +
" ],\n" + " ],\n" +
" \"spanLayer\": \"HTTP\"\n" + " \"spanLayer\": \"Http\"\n" +
" }\n" + " }\n" +
" ],\n" + " ],\n" +
" \"serviceInstanceId\": 1,\n" + " \"serviceInstanceId\": 1,\n" +
...@@ -116,6 +117,7 @@ public class ProtoBufJsonUtilsTest { ...@@ -116,6 +117,7 @@ public class ProtoBufJsonUtilsTest {
ProtoBufJsonUtils.fromJSON(json, segBuilder); ProtoBufJsonUtils.fromJSON(json, segBuilder);
SegmentObject segmentObject = segBuilder.build(); SegmentObject segmentObject = segBuilder.build();
Assert.assertEquals(2, segmentObject.getSpansCount()); Assert.assertEquals(2, segmentObject.getSpansCount());
Assert.assertEquals(SpanLayer.Http, segmentObject.getSpans(0).getSpanLayer());
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册