package dto import ( "go-admin/app/observe/models" "go-admin/common/dto" ) type TraceListReq struct { dto.Pagination models.TimeRange models.DurationRange AppAlias string `form:"app_alias"` ServiceName string `form:"service_name"` TraceId string `form:"trace_id" json:"trace_id"` Failed bool `form:"failed" json:"failed"` Kind string `from:"kind"` //异常筛选维度:app、biz、service、interface SubconditionValue string `form:"subcondition_value"` //子选项的值,例如kind为service,该值为 checkout_service,服务的英文原名 StatusMessage string `form:"status_message"` //异常简讯 } type TraceListResp struct { TraceId string `json:"trace_id"` MinTimestamp string `json:"timestamp"` MaxDuration float64 `json:"duration"` ServiceNum int64 `json:"service_num"` SpanNum int64 `json:"span_num"` // MaxDepth int64 `json:"max_depth"` } type TraceDetailReq struct { TraceId string `form:"trace_id" json:"trace_id" uri:"trace_id"` models.TimeRange } type TraceDetailResp struct { // ServiceName string `json:"service_name"` // SpanName string `json:"span_name"` // SpanKind string `json:"span_kind"` // SpanId string `json:"span_id"` // ParentSpanId string `json:"parent_span_id"` // Duration float64 `json:"duration"` models.Trace HiddenSpanAttributes map[string]string HiddenResourceAttributes map[string]string Duration float64 `json:"duration"` DurationPersent float64 `json:"duration_persent"` MaxDepth int `json:"max_depth"` Children []*TraceDetailResp `json:"children"` } type TraceGraphReq struct { TraceId string `uri:"trace_id"` } type TraceGraphEdgeRaw struct { SourceSpan string `ch:"SourceSpan"` TargetSpan string `ch:"TargetSpan"` RequestType string `ch:"RequestType"` } type TraceGraphNodeRaw struct { SpanId string `ch:"SpanId"` SpanName string `ch:"SpanName"` ServiceName string `ch:"ServiceName"` ParentSpanId string `ch:"ParentSpanId"` SpanKind string `ch:"SpanKind"` Duration float64 `ch:"Duration"` } type TraceGraphEdge struct { ID string `json:"id"` Source string `json:"source"` Target string `json:"target"` MainStat string `json:"mainstat"` SecondaryStat string `json:"secondarystat"` } type TraceGraphNode struct { ID string `json:"id"` Title string `json:"title"` SubTitle string `json:"subtitle"` MainStat string `json:"mainstat"` SecondaryStat string `json:"secondarystat"` ArcGreen float64 `json:"arc__green"` ArcRed float64 `json:"arc__red"` Icon string `json:"icon"` } type TraceGraphResp struct { Nodes []TraceGraphNode `json:"nodes"` Edges []TraceGraphEdge `json:"edges"` } type TraceDBSlowTopReq struct { AppAlias string `form:"app_alias"` models.TimeRange Limit uint8 `form:"limit"` } type TraceDBSlowTopResp struct { Datetime string `json:"datetime"` Timestamp1 string `json:"timestamp"` TraceId string `json:"trace_id"` SpanId string `json:"span_id"` SpanName string `json:"span_name"` ServiceName string `json:"service_name"` ServiceNameCN string `json:"service_name_cn"` Statement string `json:"statement"` Duration float64 `json:"duration"` }