123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- package dto
- import (
- "go-admin/app/observe/models"
- "go-admin/common/dto"
- )
- type BizListReq struct {
- dto.Pagination `search:"-"`
- AppId string `form:"app_id"`
- AppAlias string `form:"app_alias"`
- ServiceName string `form:"service_name"`
- Route string `form:"route"`
- models.TimeRange
- }
- type BizListResp struct {
- // 基础信息
- ID int64 `json:"id"`
- Name string `json:"name"`
- AppId int64 `json:"app_id"`
- ServiceName string `json:"service_name"`
- ServiceNameCN string `json:"service_name_cn"`
- SpanName string `json:"span_name"`
- Total int64 `json:"total"`
- Rpm float64 `json:"rpm"`
- ErrorNum int64 `json:"error_num"`
- ErrorRate float64 `json:"error_rate"`
- Max float64 `json:"max"`
- Min float64 `json:"min"`
- Avg float64 `json:"avg"`
- Favor int8 `json:"favor"`
- Quantiles Quantiles `json:"quantiles"`
- // 基础统计信息
- // Total int64 `json:"total"`
- // Rpm float64 `json:"rpm"`
- // ErrorNum int64 `json:"error_num"`
- // ErrorRate float64 `json:"error_rate"`
- // Max float64 `json:"max"`
- // Min float64 `json:"min"`
- // Avg float64 `json:"avg"`
- // 分位数统计信息
- // DurationStats BizListQuantile `json:"duration_stats"`
- }
- type BizBasicGuy struct {
- AppAlias string `form:"app_alias"`
- }
- type BizStatsReq struct {
- BizId string `form:"biz_id"`
- BizHash string `form:"biz_hash"`
- models.TimeRange
- }
- type BizStatsResp struct {
- BizId int64 `json:"biz_id"`
- BizHash string `json:"biz_hash"`
- Total int64 `json:"total"`
- Rpm float64 `json:"rpm"`
- ErrorNum int64 `json:"error_num"`
- ErrorRate float64 `json:"error_rate"`
- Max float64 `json:"max"`
- // Min float64 `json:"min"`
- Avg float64 `json:"avg"`
- Quantiles Quantiles `json:"quantiles"` // 分位数统计信息
- }
- type BizDetailReq struct {
- dto.Pagination `search:"-"`
- BizId string `form:"biz_id"`
- OnlyException bool `form:"only_exception"`
- models.DurationRange
- models.TimeRange
- models.SortInfo
- // Sort string `form:"sort"`
- }
- type BizDetailResp struct {
- Datetime string `json:"datetime"`
- Timestamp int64 `json:"timestamp"`
- TraceId string `json:"trace_id"`
- SpanId string `json:"span_id"`
- SpanName string `json:"span_name"`
- Duration int64 `json:"duration"`
- }
- type BizGraphReq struct {
- BizId string `form:"biz_id"`
- models.TimeRange
- }
- type BizGraphResp struct {
- // models.BizNode
- ID int64 `json:"id"`
- Name string `json:"name"`
- UniqueID string `json:"unique_id"`
- Type int64 `json:"node_type"`
- BizHash string `json:"biz_hash"`
- AppAlias string `json:"app_alias"`
- ServiceName string `json:"service_name"`
- ServiceNameCN string `json:"service_name_cn"`
- SpanName string `json:"span_name"`
- SpanKind string `json:"span_kind"`
- SpanType string `json:"span_type"`
- IsVirtual int64 `json:"is_virtual"`
- Stats *BizGraphStatsResp `json:"stats"`
- Children []*BizGraphResp `json:"children"`
- MaxDepth int64 `json:"max_depth"`
- }
- type BizGraphStatsReq struct {
- BizNodeId int64 `form:"biz_node_id"`
- models.TimeRange
- }
- type BizGraphStatsResp struct {
- BizNodeId int64 `json:"biz_node_id"`
- Duration float64 `json:"duration"`
- SuccessRate float64 `json:"success_rate"`
- SuccessRateUp bool `json:"success_rate_up"`
- }
- type BizDigitsReq struct {
- AppId int64 `form:"app_id"`
- AppAlias string `form:"app_alias"`
- models.TimeRange
- }
- type BizDigitsResp struct {
- Biz int64 `json:"biz"`
- Service int64 `json:"service"`
- Error int64 `json:"error"`
- ErrorPerMinute float64 `json:"error_per_minute"`
- ErrorRate float64 `json:"error_rate"`
- Trace float64 `json:"trace"`
- TracePerMinute float64 `json:"trace_per_minute"`
- DatabaseBiz int64 `json:"database_biz"`
- DatabaseBizPerMinute float64 `json:"database_biz_per_minute"`
- }
- type BizMarkReq struct {
- Id int64 `uri:"id"`
- Name string `form:"name"`
- }
- type BizFavorReq struct {
- Id int64 `uri:"id"`
- Favor int8 `form:"favor"`
- }
- type BizDeleteReq struct {
- Id int64 `uri:"id"`
- }
- type BizNodeSpansReq struct {
- ID int64 `form:"id"`
- Hash string `form:"hash"`
- models.TimeRange
- dto.Pagination `search:"-"`
- models.SortInfo
- }
- type BizNodeStatsReq struct {
- ID int64 `form:"id"`
- Hash string `form:"hash"`
- models.TimeRange
- }
- type BizNodeStatsResp struct {
- ID int64 `json:"id"`
- Hash string `json:"hash"`
- Total int64 `json:"total"` // 结点span总量(区间内)
- ErrorRate float64 `json:"error_rate"`
- P50 float64 `json:"p50"`
- P90 float64 `json:"p90"`
- P99 float64 `json:"p99"`
- Name string `json:"name"` // 当前为接口名, 后面可能为rpc名, 函数名等
- Value string `json:"value"` // 当前为接口地址, 后面可能为rpc地址等
- ServiceName string `json:"service_name"`
- HttpMethod string `json:"http_method"`
- DurationStats DurationStats `json:"duration_stats"`
- }
- type BizNodeUpdateReq struct {
- ID int64 `form:"id"`
- Hash string `form:"hash"`
- Name string `form:"name"`
- }
- type BizSlowTopReq struct {
- AppAlias string `form:"app_alias"`
- Limit int64 `form:"limit"`
- models.TimeRange
- }
- type BizSlowTopResp struct {
- BizId int64 `json:"biz_id"`
- BizName string `json:"biz_name"`
- BizHash string `json:"biz_hash"`
- AppAlias string `json:"app_alias"`
- ServiceName string `json:"service_name"`
- ServiceNameCN string `json:"service_name_cn"`
- SpanName string `json:"span_name"`
- SpanKind string `json:"span_kind"`
- ErrorRate float64 `json:"error_rate"`
- Duration float64 `json:"duration"`
- }
|