sample

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//最好是小写
	Module = "mod"
	App    = "app"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PromMetrics

type PromMetrics struct {

	//上报的属性名/prometheus类型/反射
	EXAMPLE_TOTAL           prometheus.CounterVec `pml:";label1,label2;namespace;subsystem;example(help msg)"`                   //name is example_total
	ExampleTotal            prometheus.CounterVec `pml:"example_test_total;label1,label2;namespace;subsystem;example(help msg)"` //name is example_test_total
	RECEIVE_REQUEST_RATE    prometheus.GaugeVec   //目前只支持Counter ,Gauge功能还未实现
	RECEIVE_REQUEST_TOTAL   prometheus.CounterVec `pml:";label1,label2;"` //有两个标签,label1,label2
	DEAL_REQUEST_SUCC_TOTAL prometheus.CounterVec
	DEAL_REQUEST_FAIL_TOTAL prometheus.CounterVec

	HISTOGRAM_TEST prometheus.Histogram `pml:";;;;1,2,3,4;"` //buckets []float64{1,2,3,4}
	SUMMARY_TEST   prometheus.Summary   `pml:";;;;;"`        //有两个标签,label1,label2

	//TODO: add your metrics
	RECV_TEST_TOTAL prometheus.Counter `pml:";;;;just for test"`
}
var M PromMetrics

Jump to

Keyboard shortcuts

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