Documentation
¶
Index ¶
- Constants
- func AllExceptionStats(intv int64) map[string]int
- func ApiDashboard(c echo.Context) error
- func ApiDetail(c echo.Context) error
- func ApiStats(c echo.Context) error
- func Dashboard(c echo.Context) error
- func ExceptionDashboard(c echo.Context) error
- func ExceptionStats(c echo.Context) error
- func List(c echo.Context) error
- func ListWithSetting(c echo.Context) error
- func Methods(c echo.Context) error
- func QueryAPPServiceMap(c echo.Context) error
- func QueryAgents(c echo.Context) error
- func QueryAll(c echo.Context) error
- func QueryAllWithSetting(c echo.Context) error
- func QueryApiMap(c echo.Context) error
- func QueryApis(c echo.Context) error
- func QueryAppBaseStatusList(c echo.Context) error
- func QueryAppDetailStatus(c echo.Context) error
- func QueryPlatformStatus(c echo.Context) error
- func QueryServiceMap(c echo.Context) error
- func QueryTrace(c echo.Context) error
- func QueryTraces(c echo.Context) error
- func RuntimeDashByUnixTime(c echo.Context) error
- func RuntimeDashboard(c echo.Context) error
- func SqlDashboard(c echo.Context) error
- func SqlStats(c echo.Context) error
- func UserSetting(user string) (int, []string)
- type Agent
- type AgentInfo
- type ApiMethod
- type ApiStat
- type ChartTraces
- type DashResult
- type Exception
- type IntBooleanIntBooleanValue
- type IntStringStringValue
- type IntStringValue
- type LongIntIntByteByteStringValue
- type MonitorAppStatus
- type MonitorAppStatusItem
- type Node
- type NodeLink
- type QASData
- type QASResult
- type QDSData
- type QDSResult
- type QPSData
- type QPSResult
- type RuntimeResult
- type ServerMetaData
- type ServiceMapResult
- type SpanEvent
- type SpanEvents
- type SqlDashResult
- type SqlStat
- type SqlStatList
- type Stat
- type TagValue
- type TempTag
- type Trace
- type TraceSeries
- type TraceTag
- type TraceTree
- type TraceTreeNode
- type Traces
Constants ¶
View Source
const ( AppNode = 1 ApiNode = 2 )
View Source
const ( Normal = 0 Infra = 1 Entry = 2 )
View Source
const PlatformName = "openapm"
View Source
const PlatformUrl = "http://apmtest.tf56.lo/ui"
Variables ¶
This section is empty.
Functions ¶
func ApiDashboard ¶
func ExceptionDashboard ¶
func ExceptionStats ¶
func ListWithSetting ¶
func QueryAgents ¶
func QueryAllWithSetting ¶
func QueryAppBaseStatusList ¶
func QueryAppDetailStatus ¶
func QueryTrace ¶
func QueryTraces ¶
traceSeries":[{"name":"success","color":"rgb(18, 147, 154,.5)","data":[{"x":1545200556716,"y":7,"traceId":"yunbaoParkApp3^1545036617750^4217","agentId":"agencyBookKeep3","startTime":"1545200556716","url":"/agencyBookKeep/financialstatementscs/getOneAccountingDataByParams","traceIp":"127.0.0.1"},
func RuntimeDashByUnixTime ¶
func RuntimeDashboard ¶
func SqlDashboard ¶
Types ¶
type Agent ¶
type Agent struct {
AgentID string `json:"agent_id"`
HostName string `json:"host_name"`
IP string `json:"ip"`
IsLive bool `json:"is_live"`
IsContainer bool `json:"is_container"`
StartTime string `json:"start_time"`
SocketID int `json:"socket_id"`
OperatingEnv int `json:"operating_env"`
TracingAddr string `json:"tracing_addr "`
Info *AgentInfo `json:"info"`
}
type AgentInfo ¶
type AgentInfo struct {
AgentVersion string `json:"agentVersion"`
VmVersion string `json:"vmVersion"`
Pid int `json:"pid"`
ServerMetaData *ServerMetaData `json:"serverMetaData"`
}
type ApiMethod ¶
type ApiMethod struct {
ID int `json:"-"`
API string `json:"api"`
ServiceType string `json:"service_type"`
RatioElapsed int `json:"ratio_elapsed"`
Elapsed int `json:"elapsed"`
MaxElapsed int `json:"max_elapsed"`
MinElapsed int `json:"min_elapsed"`
Count int `json:"count"`
AverageElapsed float64 `json:"average_elapsed"`
ErrorCount int `json:"error_count"`
Method string `json:"method"`
Class string `json:"class"`
}
type ChartTraces ¶
type ChartTraces struct {
Suc bool `json:"is_suc"`
Xaxis []int64 `json:"timeXticks"`
Title string `json:"subTitle"`
Series []*TraceSeries `json:"series"`
}
type DashResult ¶
type Exception ¶
type Exception struct {
ID int `json:"id"`
Exception string `json:"exception"`
ServiceType string `json:"service_type"`
Elapsed int `json:"elapsed"`
MaxElapsed int `json:"max_elapsed"`
MinElapsed int `json:"min_elapsed"`
Count int `json:"count"`
AverageElapsed float64 `json:"average_elapsed"`
Method string `json:"method"`
Class string `json:"class"`
}
type IntStringStringValue ¶
type IntStringValue ¶
type LongIntIntByteByteStringValue ¶
type LongIntIntByteByteStringValue struct {
LongValue int64 `json:"longValue"`
IntValue1 int32 `json:"intValue1"`
IntValue2 int32 `json:"intValue2,omitempty"`
ByteValue1 int8 `json:"byteValue1,omitempty"`
ByteValue2 int8 `json:"byteValue2,omitempty"`
StringValue string `json:"stringValue,omitempty"`
}
type MonitorAppStatus ¶
type MonitorAppStatus struct {
AppName string `json:"applicationName"`
WarningLevel string `json:"appWarningLevel"`
Items []*MonitorAppStatusItem `json:"items"`
}
type MonitorAppStatusItem ¶
type Node ¶
type Node struct {
Name string `json:"name"`
SpanCount int `json:"span_count"` // 收到的请求次数
ErrorCount int `json:"error_count"` // 错误次数
Category int `json:"category"` // 节点类型: 0: normal 1: infra 2:entry
// contains filtered or unexported fields
}
这里的ErrorCount和SpanCount是为了展示当前节点的内部异常情况
type NodeLink ¶
type NodeLink struct {
Source string `json:"source"` // 起点app name
Target string `json:"target"` // 终点app name
AccessCount int `json:"access_count"` // 请求次数
ErrorCount int `json:"error_count"` // 错误次数
AverageDuration int `json:"avg"` // 平均耗时
// contains filtered or unexported fields
}
这里的ErrorCount和ReqCount是为了计算请求错误率 A -> B Source: A, Target B A访问B的所有错误都计算在ErrorCount中,包含网络不通引起的错误
type QASData ¶
type QASData struct {
PlatformName string `json:"platformName"`
PlatformUrl string `json:"platformUrl"`
ItemNameList []string `json:"itemNameList"`
MonitorAppStatusList []*MonitorAppStatus `json:"monitorAppStatusList"`
}
type QDSData ¶
type QDSData struct {
SystemName string `json:"systemName"`
PlatformUrl string `json:"platformUrl"`
AppName string `json:"applicationName"`
WarningLevel string `json:"appWarningLevel"`
Items []*MonitorAppStatusItem `json:"items"`
}
type RuntimeResult ¶
type RuntimeResult struct {
Timeline []string `json:"timeline"`
JvmCpuList []float64 `json:"jvm_cpu_list"`
SysCpuList []float64 `json:"sys_cpu_list"`
JvmHeapList []int64 `json:"jvm_heap_list"`
HeapMaxList []int64 `json:"heap_max_list"`
FullgcCountList []int64 `json:"fullgc_count_list"`
FullgcDurationList []int64 `json:"fullgc_duration_list"`
}
type ServerMetaData ¶
type ServiceMapResult ¶
type SpanEvent ¶
type SpanEvent struct {
Sequence int `json:"sequence"`
StartElapsed int `json:"startElapsed"`
EndElapsed int `json:"endElapsed"`
ServiceType int `json:"serviceType"`
EndPoint string `json:"endPoint"`
Annotations []*TempTag `json:"annotations"`
Depth int `json:"depth"`
NextSpanID int64 `json:"nextSpanId"`
DestinationID string `json:"destinationId"`
MethodID int `json:"apiId"`
ExceptionInfo *IntStringValue `json:"exceptionInfo"`
}
type SpanEvents ¶
type SpanEvents []*SpanEvent
func (SpanEvents) Len ¶
func (o SpanEvents) Len() int
func (SpanEvents) Less ¶
func (o SpanEvents) Less(i, j int) bool
func (SpanEvents) Swap ¶
func (o SpanEvents) Swap(i, j int)
type SqlDashResult ¶
type SqlStatList ¶
type SqlStatList []*SqlStat
func (SqlStatList) Len ¶
func (a SqlStatList) Len() int
func (SqlStatList) Less ¶
func (a SqlStatList) Less(i, j int) bool
func (SqlStatList) Swap ¶
func (a SqlStatList) Swap(i, j int)
type Stat ¶
type Stat struct {
Name string `json:"name"`
Count int `json:"count"`
Apdex float64 `json:"apdex"`
AverageElapsed float64 `json:"average_elapsed"`
ErrorPercent float64 `json:"error_percent"`
ExPercent int `json:"ex_percent"`
Alive int `json:"alive"` // 存活节点数量
Unalive int `json:"unalive"` // 不存活节点数量
// contains filtered or unexported fields
}
type TagValue ¶
type TagValue struct {
StringValue string `json:"stringValue,omitempty"`
BoolValue bool `json:"boolValue,omitempty"`
IntValue int32 `json:"intValue,omitempty"`
LongValue int64 `json:"longValue,omitempty"`
ShortValue int16 `json:"shortValue,omitempty"`
DoubleValue float64 `json:"doubleValue,omitempty"`
BinaryValue []byte `json:"binaryValue,omitempty"`
ByteValue int8 `json:"byteValue,omitempty"`
IntStringValue *IntStringValue `json:"intStringValue,omitempty"`
IntStringStringValue *IntStringStringValue `json:"intStringStringValue,omitempty"`
LongIntIntByteByteStringValue *LongIntIntByteByteStringValue `json:"longIntIntByteByteStringValue,omitempty"`
IntBooleanIntBooleanValue *IntBooleanIntBooleanValue `json:"intBooleanIntBooleanValue,omitempty"`
}
type TraceSeries ¶
type TraceTree ¶
type TraceTree []*TraceTreeNode
type TraceTreeNode ¶
type TraceTreeNode struct {
ID string `json:"id"` // seg的id,p-0/p-0-1类的形式,通过这种形式形成层级tree
Sequence int `json:"seq"`
SpanID string `json:"span_id"`
Type string `json:"type"` // 1: span 2. event 3. tag
Depth int `json:"depth"` //node在完整的链路树上所处的层级,绝对层级 Tree Depth
SpanDepth int `json:"span_depth"` //node对应的event在对应span中的层级,相对层级 span depth
AppName string `json:"app_name"`
MethodID int `json:"method_id"`
Method string `json:"method"`
Duration int `json:"duration"` // 耗时,-1 代表不显示耗时信息
Params string `json:"params"`
ServiceType string `json:"service_type"`
AgentID string `json:"agent_id"`
Class string `json:"class"`
StartTime string `json:"start_time"`
Icon string `json:"icon"` // 有些节点会显示特殊的icon,作为样式
IsError bool `json:"is_error"` // 是否是错误/异常,
DID string `json:"did"` // 用于debug,event的destination_id
NID string `json:"nid"` // 用于debug, event的next_span_id
// contains filtered or unexported fields
}
为了形成全链路,我们需要把trace的span和event组成一个tree结构,span和event对应的是tree node Tags、Exceptions都将转换为node进行展示
Click to show internal directories.
Click to hide internal directories.