This is an automated email from the ASF dual-hosted git repository.

qiuxiafan 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 b32f9f0  feat: change SpanLayer type and SpanType type according to 
tracing pb (#76)
b32f9f0 is described below

commit b32f9f00a84ba0f74faae2165964ec50c61677ea
Author: tickli <[email protected]>
AuthorDate: Tue Dec 28 09:48:48 2021 +0800

    feat: change SpanLayer type and SpanType type according to tracing pb (#76)
    
    Co-authored-by: tickli <[email protected]>
---
 src/services/constant.ts | 20 ++++++++++++++++++--
 src/trace/type.d.ts      |  4 ++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/services/constant.ts b/src/services/constant.ts
index 9e1f172..04135d9 100644
--- a/src/services/constant.ts
+++ b/src/services/constant.ts
@@ -37,8 +37,24 @@ export enum ReportTypes {
   SEGMENTS = '/v3/segments',
 }
 
-export const SpanLayer = 'Http';
-export const SpanType = 'Exit';
+export enum SpanLayerType {
+  UNKNOWN = 0,
+  DATABASE = 1,
+  RPC_FRAMEWORK = 2,
+  HTTP = 3,
+  MQ = 4,
+  CACHE = 4,
+}
+
+export const SpanLayer = SpanLayerType.HTTP;
+
+export enum SpanTypeEnum {
+  ENTRY = 0,
+  EXIT = 1,
+  LOCAL = 2,
+}
+
+export const SpanType = SpanTypeEnum.EXIT;
 export enum ReadyStatus {
   OPENED = 1,
   DONE = 4,
diff --git a/src/trace/type.d.ts b/src/trace/type.d.ts
index 2e49bd6..d253190 100644
--- a/src/trace/type.d.ts
+++ b/src/trace/type.d.ts
@@ -28,8 +28,8 @@ export interface SpanFields {
   startTime: number;
   endTime: number;
   spanId: number;
-  spanLayer: string;
-  spanType: string;
+  spanLayer: number;
+  spanType: number;
   isError: boolean;
   parentSpanId: number;
   componentId: number;

Reply via email to