Documentation ¶
Index ¶
- Variables
- func Exit()
- func GetTimestamp() int64
- func IsExited() bool
- func Start()
- func TranslateToN9EPoint(point *Point) *dataobj.MetricValue
- type ArgCacheUnit
- type Clock
- type Func
- func (f Func) FormatArgLines(argLines string, metricLines string) (string, []string, error)
- func (f Func) FormatMetricLine(metricLine string, aggrs []string) (string, error)
- func (f Func) GetAggrsFromArgLines(argLines string) ([]string, error)
- func (f Func) HasSameSortedArray(a [][]string) bool
- func (f Func) IsOk(code string) bool
- func (f Func) IsSubKeys(a []string, b map[string]string) bool
- func (f Func) MergeSortedArrays(consts, vars [][]string) [][]string
- func (f Func) TranslateArgLines(argLines string, aggrNeed ...bool) (map[string]string, string, error)
- func (f Func) TranslateMetricLine(metricLine string) ([]string, error)
- func (f Func) TranslateValueLine(valueLine string) ([]string, error)
- func (f Func) TrimRpcCallee(callee string) string
- type Point
- type StatsdReceiver
- type StatsdReporter
- type StatsdState
- type TraceHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // metrics支持的聚合类型 CommonAggregatorsConst = map[string]bool{ "c": true, "ce": true, "rpc": true, "r": true, "rt": true, "p1": true, "p5": true, "p25": true, "p50": true, "p75": true, "p90": true, "p95": true, "p99": true, "rpce": true, "max": true, "min": true, "sum": true, "avg": true, "cnt": true, "g": true, } HistogramAggregatorsConst = map[string]bool{ "p1": true, "p5": true, "p25": true, "p50": true, "p75": true, "p90": true, "p95": true, "p99": true, "max": true, "min": true, "sum": true, "avg": true, "cnt": true, } Const_CommonAggregator_Rpc = "rpc" Const_CommonAggregator_RpcE = "rpce" // rpc状态码 RpcOkCodesConst = map[string]bool{"ok": true, "0": true, "200": true, "201": true, "203": true} // metrics支持的最大tag数 MaxTagsCntConst = 12 // ns前缀后缀 NsPrefixConst = "" NsSuffixConst = "" // 需要聚合的metric MetricToBeSummarized_RpcdisfConst = "rpcdisf" MetricToBeSummarized_RpcdfeConst = "rpcdfe" MetricToBeSummarized_DirpcCallConst = "rpc_dirpc_call" MetricToBeSummarized_DirpcCalledConst = "rpc_dirpc_called" // summarize等待collect结束的超时时间 SummarizeWaitCollectTimeoutMsConst = 2000 // traceid对应的tagk TagTraceId = "traceid" // LRU 缓存的大小 MaxLRUCacheSize = 10000 // 并包模式下的分隔符 MergeDelimiter = "&" // $value,$statusCode的分隔符, 向前兼容, 使用 "," CodeDelimiter = "," )
Functions ¶
func GetTimestamp ¶
func GetTimestamp() int64
func TranslateToN9EPoint ¶
func TranslateToN9EPoint(point *Point) *dataobj.MetricValue
Types ¶
type ArgCacheUnit ¶
func NewArgCacheUnit ¶
func NewArgCacheUnit(argline string, aggrs []string, tags map[string]string) *ArgCacheUnit
func NewArgCacheUnitWithError ¶
func NewArgCacheUnitWithError(err error) *ArgCacheUnit
type Func ¶
type Func struct{}
func (Func) FormatArgLines ¶
tags+aggr lines
func (Func) FormatMetricLine ¶
metric line: $ns/$raw-metric
func (Func) GetAggrsFromArgLines ¶
func (Func) HasSameSortedArray ¶
检查 排序字符串数组数组 a中是否有完全相同的数组
func (Func) MergeSortedArrays ¶
consts不能被修改, vars可以被修改
func (Func) TranslateArgLines ¶
func (Func) TranslateMetricLine ¶
func (Func) TranslateValueLine ¶
value line 拆解为子字符串, 根据协议不同, 每个协议单独对子串进行处理
func (Func) TrimRpcCallee ¶
type Point ¶
type Point struct { Namespace string `json:"namespace"` Name string `json:"name"` Timestamp int64 `json:"timestamp"` Tags map[string]string `json:"tags"` Value float64 `json:"value"` Step int `json:"step"` }
point to n9e-agent
type StatsdReceiver ¶
type StatsdReceiver struct{}
func (StatsdReceiver) HandlePacket ¶
func (self StatsdReceiver) HandlePacket(packet string)
type StatsdReporter ¶
type StatsdReporter struct{}
func (StatsdReporter) LastPoints ¶
func (self StatsdReporter) LastPoints() []*Point
func (StatsdReporter) Report ¶
func (self StatsdReporter) Report()
type StatsdState ¶
type StatsdState struct{}
func (StatsdState) GetState ¶
func (self StatsdState) GetState() *state
func (StatsdState) RollState ¶
func (self StatsdState) RollState() *state
Click to show internal directories.
Click to hide internal directories.