Documentation ¶
Index ¶
- Constants
- Variables
- func String2Bytes(s string) []byte
- type AggregatedTime
- type AttributeMap
- func (a *AttributeMap) AddBoolValue(key string, value bool)
- func (a *AttributeMap) AddIntValue(key string, value int64)
- func (a *AttributeMap) AddStringValue(key string, value string)
- func (a *AttributeMap) GetBoolValue(key string) bool
- func (a *AttributeMap) GetIntValue(key string) int64
- func (a *AttributeMap) GetStringValue(key string) string
- func (a *AttributeMap) HasAttribute(key string) bool
- func (a AttributeMap) MarshalJSON() ([]byte, error)
- func (a *AttributeMap) Size() int
- func (a *AttributeMap) String() string
- func (a *AttributeMap) ToStringMap() map[string]string
- type AttributeValue
- type AttributeValueType
- type CPUType
- type CameraEventGroup
- type CameraEventLabel
- type CpuEvent
- type JavaFutexEvent
- type Profiles
- type SpanTraceGroup
- type SpanTraceLabel
- type Trace
- type Traces
- type TransactionIdEvent
Constants ¶
View Source
const ( KEY_TRACE_ID = "traceId" // 突变Span KEY_SPAN_ID = "spanId" // 突变类型 KEY_CPU_TYPE = "cpuType" )
Variables ¶
View Source
var CPUTypes = [CPUTYPE_MAX]string{ CPUType_ON: "cpu", CPUType_FILE: "file", CPUType_NET: "net", CPUType_FUTEX: "futex", CPUType_IDLE: "idle", CPUType_OTHER: "other", CPUType_EPOLL: "epoll", CPUType_RUNQ: "runq", }
Functions ¶
func String2Bytes ¶
Types ¶
type AggregatedTime ¶
type AggregatedTime struct { // on, file, net, futex, idle, other, epoll Times [CPUTYPE_MAX]uint64 }
type AttributeMap ¶
type AttributeMap struct {
// contains filtered or unexported fields
}
func NewAttributeMap ¶
func NewAttributeMap() *AttributeMap
func (*AttributeMap) AddBoolValue ¶
func (a *AttributeMap) AddBoolValue(key string, value bool)
func (*AttributeMap) AddIntValue ¶
func (a *AttributeMap) AddIntValue(key string, value int64)
func (*AttributeMap) AddStringValue ¶
func (a *AttributeMap) AddStringValue(key string, value string)
func (*AttributeMap) GetBoolValue ¶
func (a *AttributeMap) GetBoolValue(key string) bool
func (*AttributeMap) GetIntValue ¶
func (a *AttributeMap) GetIntValue(key string) int64
func (*AttributeMap) GetStringValue ¶
func (a *AttributeMap) GetStringValue(key string) string
func (*AttributeMap) HasAttribute ¶
func (a *AttributeMap) HasAttribute(key string) bool
func (AttributeMap) MarshalJSON ¶
func (a AttributeMap) MarshalJSON() ([]byte, error)
func (*AttributeMap) Size ¶
func (a *AttributeMap) Size() int
func (*AttributeMap) String ¶
func (a *AttributeMap) String() string
func (*AttributeMap) ToStringMap ¶
func (a *AttributeMap) ToStringMap() map[string]string
type AttributeValue ¶
type AttributeValue interface { Type() AttributeValueType ToString() string }
type AttributeValueType ¶
type AttributeValueType int
const ( StringAttributeValueType AttributeValueType = iota IntAttributeValueType BooleanAttributeValueType )
type CameraEventGroup ¶
type CameraEventGroup struct { Timestamp uint64 `json:"timestamp"` Labels CameraEventLabel `json:"labels"` }
type CameraEventLabel ¶
type CpuEvent ¶
type CpuEvent struct { StartTime uint64 `json:"startTime"` EndTime uint64 `json:"endTime"` TypeSpecs []uint64 `json:"typeSpecs"` RunqLatency []uint64 `json:"runqLatency"` TimeType []CPUType `json:"timeType"` OnInfo string `json:"onInfo"` OffInfo string `json:"offInfo"` Log string `json:"log"` Stack string `json:"stack"` }
type JavaFutexEvent ¶
type Profiles ¶
type Profiles struct { // Trace开始时间 StartTime uint64 // Trace结束时间 EndTime uint64 // 汇总时间分布 AggTime AggregatedTime // 存储所有CPUEvents CpuEvents []*CpuEvent // 存储所有FutexEvents Futexs []*JavaFutexEvent OffsetTs []int64 }
func NewProfiles ¶
func (*Profiles) AddCpuEvents ¶
func (*Profiles) AddFutexEvents ¶
func (p *Profiles) AddFutexEvents(events []*JavaFutexEvent)
func (*Profiles) CalcProfileEventMetrics ¶
func (p *Profiles) CalcProfileEventMetrics()
CalcProfileEventMetrics 计算北极星指标
type SpanTraceGroup ¶
type SpanTraceGroup struct { Timestamp uint64 `json:"timestamp"` Labels SpanTraceLabel `json:"labels"` }
type SpanTraceLabel ¶
type SpanTraceLabel struct { Pid uint64 `json:"pid"` Tid uint64 `json:"tid"` ApmType string `json:"apm_type"` ApmSpantId string `json:"apm_span_id"` ContentKey string `json:"content_key"` EndTime uint64 `json:"end_time"` Duration uint64 `json:"duration"` P90 float64 `json:"p90"` TraceId string `json:"trace_id"` ContainerId string `json:"container_id"` ContainerName string `json:"container_name"` WorkloadName string `json:"workload_name"` WorkloadKind string `json:"workload_kind"` PodIp string `json:"pod_ip"` PodName string `json:"pod_name"` Namespace string `json:"namespace"` IsProfiled bool `json:"is_profiled"` IsError bool `json:"is_error"` IsSlow bool `json:"is_slow"` NodeName string `json:"node_name"` NodeIp string `json:"node_ip"` OffsetTs int64 `json:"offset_ts"` }
type Trace ¶
type Trace struct { Pid uint64 Tid uint64 ApmType string ApmSpanId string Url string ContainerId string ContainerName string WorkloadName string WorkloadKind string PodIp string PodName string Namespace string StartTime uint64 EndTime uint64 P90 uint64 IsProfiled bool NodeName string NodeIp string OffsetTs int64 }
func NewTrace ¶
func NewTrace(group *SpanTraceGroup) *Trace
func (*Trace) GetDuration ¶
type Traces ¶
func (*Traces) GetSpanIds ¶
type TransactionIdEvent ¶
Click to show internal directories.
Click to hide internal directories.