You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2020/12/31 10:27:48 UTC
[skywalking-client-js] branch master updated: fix:parentSpanId (#31)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-client-js.git
The following commit(s) were added to refs/heads/master by this push:
new 9792c2c fix:parentSpanId (#31)
9792c2c is described below
commit 9792c2ce7db5eff871b40ed400e8b784857153e9
Author: Qiuxia Fan <fi...@outlook.com>
AuthorDate: Thu Dec 31 18:27:43 2020 +0800
fix:parentSpanId (#31)
---
src/trace/segment.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/trace/segment.ts b/src/trace/segment.ts
index 0c22640..3f4cc2b 100644
--- a/src/trace/segment.ts
+++ b/src/trace/segment.ts
@@ -68,7 +68,7 @@ export default function traceSegment(options: CustomOptionsType) {
spanLayer: SpanLayer,
spanType: SpanType,
isError: event.detail.status >= 400 ? true : false,
- parentSpanId: segment.spans.length,
+ parentSpanId: segment.spans.length - 1,
componentId: ComponentId,
peer: segCollector[i].event.responseURL.split('://')[1],
};