feat: add Trace in dashboards (#18)

* feat: add trace tool

* feat: add trace

* feat: add trace filters

* feat: add trace list

* feat: add trace detail

* fix: update trace detail

* feat: add trace list

* fix: update trace list

* feat: add trace tree

* fix: update trace tree

* feat: add trace table

* feat: add trace statistics

* fix: update trace statistics

* fix: update resize

* feat: add trace log

* feat: add related logs

* feat: add loading

* fix: update name

* feat: watch selectors

* fix: view span on table

* fix ci

* fix: update file name

* fix: update file name

* fix: update file name

* fix: update filters

* build: add package
This commit is contained in:
Fine0830
2022-02-26 22:47:53 +08:00
committed by GitHub
parent 7fe0a57e49
commit 977ffbaf74
74 changed files with 5507 additions and 53 deletions

View File

@@ -15,25 +15,25 @@
* limitations under the License.
*/
export type Service = {
id: string;
id?: string;
label: string;
value: string;
layers: string[];
normal: boolean;
group: string;
layers?: string[];
normal?: boolean;
group?: string;
};
export type Instance = {
value: string;
label: string;
layer: string;
language: string;
instanceUUID: string;
attributes: { name: string; value: string }[];
layer?: string;
language?: string;
instanceUUID?: string;
attributes?: { name: string; value: string }[];
};
export type Endpoint = {
id: string;
id?: string;
label: string;
value: string;
};

79
src/types/trace.d.ts vendored Normal file
View File

@@ -0,0 +1,79 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface Trace {
duration: number;
isError: boolean;
key: string;
operationNames: string[];
start: string;
traceIds: Array<string | any>;
}
export interface Span {
endpointName: string;
serviceCode: string;
parentSpanId: number;
segmentId: string;
label?: string;
layer: string;
spanId: number;
traceId: string;
type: string;
peer: string;
component: string;
isError: boolean;
isBroken?: boolean;
refs: Array<Ref>;
startTime: number;
endTime: number;
dur?: number;
children?: Span[];
tags?: Array<Map<string, string>>;
logs?: log[];
}
export interface log {
time: number;
data: Map<string, string>;
}
export interface Ref {
traceId: string;
parentSegmentId: string;
parentSpanId: number;
type: string;
}
export interface StatisticsSpan {
groupRef: StatisticsGroupRef;
maxTime: number;
minTime: number;
sumTime: number;
avgTime: number;
count: number;
}
export interface StatisticsGroupRef {
endpointName: string;
type: string;
}
export class TraceTreeRef {
segmentMap: Map<string, Span>;
segmentIdGroup: string[];
}