metric

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: GPL-3.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetricLogModuleError

func MetricLogModuleError(metrics ...MetricModuleError)

MetricLogModuleError 用于统计各个组件发生 error 的数量

func MetricLogSnapshotStage

func MetricLogSnapshotStage(metrics ...MetricSnapshotStage)

MetricLogSnapshotStage 用于统计 snapshot 的各种时延

Types

type MetricModuleError

type MetricModuleError struct {
	Tag       string     `json:"tag"`
	Timestamp string     `json:"timestamp"`
	Module    ModuleType `json:"snapshot_stage"`
}

type MetricSnapshotStage

type MetricSnapshotStage struct {
	Tag        string    `json:"tag"`
	SnapshotID string    `json:"snapshot_id"`
	Timestamp  string    `json:"timestamp"`
	Stage      StageType `json:"snapshot_stage"`
}

type ModuleType

type ModuleType string
const (
	ModuleTypeExporter        ModuleType = "exporter"
	ModuleTypeReceiver        ModuleType = "receiver"
	ModuleTypeMq              ModuleType = "mq"
	ModuleTypeMeta            ModuleType = "meta"
	ModuleTypeResolver        ModuleType = "resolver"
	ModuleTypeResolverMgr     ModuleType = "resolver_mgr"
	ModuleTypeResolverHandler ModuleType = "resolver_handler"
	ModuleTypeUnknown         ModuleType = "unknown"
)

func (ModuleType) String

func (t ModuleType) String() string

type StageType

type StageType string
const (
	StageTypeInit    StageType = "init"
	StageTypeFinal   StageType = "final"
	StageTypePair    StageType = "pair"
	StageTypeError   StageType = "error"
	StageTypeUnknown StageType = "unknown"
)

func (StageType) String

func (t StageType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL